MJSconfig errors, works locally, can’t deploy to Vercel. I get these errors:
Answered
West African Lion posted this in #help-forum
West African LionOP
[00:28:04]
[00:28:04] The dependency was already listed in devDependencies.
[00:28:04] If you want to make it a prod dependency, then move it manually.
[00:28:04]
[00:28:04] Done in 13.5s
[00:28:04] Detected Next.js version: 14.0.4-canary.16
[00:28:04] Running "pnpm run build"
[00:28:05]
[00:28:05] > ableandrew.com@0.1.0 build /vercel/path0
[00:28:05] > npm run setup && next build
[00:28:05]
[00:28:05]
[00:28:05] > ableandrew.com@0.1.0 setup
[00:28:05] > node ./setup.mjs
[00:28:05]
[00:28:05] node:internal/modules/cjs/loader:1080
[00:28:05] throw err;
[00:28:05] ^
[00:28:05]
[00:28:05] Error: Cannot find module '/vercel/path0/setup.mjs'
[00:28:05] at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
[00:28:05] at Module._load (node:internal/modules/cjs/loader:922:27)
[00:28:05] at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
[00:28:05] at node:internal/main/run_main_module:23:47 {
[00:28:05] code: 'MODULE_NOT_FOUND',
[00:28:05] requireStack: []
[00:28:05] }
[00:28:05]
[00:28:05] Node.js v18.17.1
[00:28:05]  ELIFECYCLE  Command failed with exit code 1.
[00:28:05] Error: Command "pnpm run build" exited with 1
[00:28:06]
Here is a link to the repo. https://github.com/AndrewVoirol/ableandrew.com
[00:28:04] The dependency was already listed in devDependencies.
[00:28:04] If you want to make it a prod dependency, then move it manually.
[00:28:04]
[00:28:04] Done in 13.5s
[00:28:04] Detected Next.js version: 14.0.4-canary.16
[00:28:04] Running "pnpm run build"
[00:28:05]
[00:28:05] > ableandrew.com@0.1.0 build /vercel/path0
[00:28:05] > npm run setup && next build
[00:28:05]
[00:28:05]
[00:28:05] > ableandrew.com@0.1.0 setup
[00:28:05] > node ./setup.mjs
[00:28:05]
[00:28:05] node:internal/modules/cjs/loader:1080
[00:28:05] throw err;
[00:28:05] ^
[00:28:05]
[00:28:05] Error: Cannot find module '/vercel/path0/setup.mjs'
[00:28:05] at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
[00:28:05] at Module._load (node:internal/modules/cjs/loader:922:27)
[00:28:05] at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
[00:28:05] at node:internal/main/run_main_module:23:47 {
[00:28:05] code: 'MODULE_NOT_FOUND',
[00:28:05] requireStack: []
[00:28:05] }
[00:28:05]
[00:28:05] Node.js v18.17.1
[00:28:05]  ELIFECYCLE  Command failed with exit code 1.
[00:28:05] Error: Command "pnpm run build" exited with 1
[00:28:06]
Here is a link to the repo. https://github.com/AndrewVoirol/ableandrew.com
Answered by West African Lion
So it was an issue with the config of the setup.mjs of the template from Vercel, it was setup before src folder conventions were recommended, and also didn't clean it's setup after pnpm build. SO after clearing out the setup.mjs file, it deployed with no issues. Well except for the fact that it's one basic app and deployment and has next to nothing in content or styling lol. Problem solved though!
2 Replies
West African LionOP
Thanks I'm just looking for some guidance or even a small nudge to figure out why I can't seem to deploy this next.js by vercel template to vercel.
West African LionOP
So it was an issue with the config of the setup.mjs of the template from Vercel, it was setup before src folder conventions were recommended, and also didn't clean it's setup after pnpm build. SO after clearing out the setup.mjs file, it deployed with no issues. Well except for the fact that it's one basic app and deployment and has next to nothing in content or styling lol. Problem solved though!
Answer