Getting errors on this log after trying to deploy

need help
4 Replies
Edge
EdgeOP3w ago
/opt/buildhome/repo/src/main.js:2 09:06:10.731 import { Chessboard, PIECES_FILE_TYPE } from 'https://cdn.jsdelivr.net/npm/[email protected]/+esm'; 09:06:10.731 ^^^^^^ 09:06:10.731
09:06:10.731 SyntaxError: Cannot use import statement outside a module 09:06:10.731 at internalCompileFunction (node:internal/vm:73:18) 09:06:10.732 at wrapSafe (node:internal/modules/cjs/loader:1178:20) 09:06:10.732 at Module._compile (node:internal/modules/cjs/loader:1220:27) 09:06:10.732 at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) 09:06:10.732 at Module.load (node:internal/modules/cjs/loader:1119:32) 09:06:10.732 at Module._load (node:internal/modules/cjs/loader:960:12) 09:06:10.732 at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) 09:06:10.732 at node:internal/main/run_main_module:23:47 09:06:10.732
09:06:10.732 Node.js v18.17.1 09:06:10.737 Failed: Error while executing user command. Exited with error code: 1 09:06:10.748 Failed: build command exited with code: 1 09:06:11.915 Failed: error occurred while running build command nnow im getting this
jayke
jayke3w ago
create a new environment variable from the settings page called NODE_VERSION with a value of whatever node version you used in your local dev environment. i set mine to 23.3.0 but your milelage may vary.
AGill
AGill3w ago
Why 23? LTS versions are even numbers so 22 then 24
Edge
EdgeOP3w ago
so ive fixed everything but now its been building the application for like 10min lol and its not a big project

Did you find this page helpful?