Can't deploy to Vercel
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 172
- PR merge metrics
- No merged PRs in 30d
Description
00:45:41.305 | Running "vercel build"
00:45:42.224 | Vercel CLI 34.2.4
00:45:43.428 | Installing dependencies...
00:46:05.855 |
00:46:05.855 | added 544 packages in 22s
00:46:05.856 |
00:46:05.856 | 171 packages are looking for funding
00:46:05.856 | run `npm fund` for details
00:46:05.892 | Detected `package-lock.json` generated by npm 7+
00:46:05.892 | Running "npm run build"
00:46:06.184 |
00:46:06.184 | > private-chat@0.0.0 build
00:46:06.184 | > tsc && vite build
00:46:06.184 |
00:46:09.892 | /vercel/path0/node_modules/rollup/dist/native.js:59
00:46:09.892 | throw new Error(
00:46:09.892 | ^
00:46:09.892 |
00:46:09.893 | Error: Cannot find module @rollup/rollup-linux-x64-gnu. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
00:46:09.893 | at requireWithFriendlyError (/vercel/path0/node_modules/rollup/dist/native.js:59:9)
00:46:09.893 | at Object. (/vercel/path0/node_modules/rollup/dist/native.js:68:76)
00:46:09.893 | ... 3 lines matching cause stack trace ...
00:46:09.893 | at Module._load (node:internal/modules/cjs/loader:1022:12)
00:46:09.893 | at cjsLoader (node:internal/modules/esm/translators:366:17)
00:46:09.893 | at ModuleWrap. (node:internal/modules/esm/translators:315:7)
00:46:09.893 | at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
00:46:09.893 | at async ModuleLoader.import (node:internal/modules/esm/loader:323:24) {
00:46:09.893 | [cause]: Error: Cannot find module '@rollup/rollup-linux-x64-gnu'
00:46:09.893 | Require stack:
00:46:09.893 | - /vercel/path0/node_modules/rollup/dist/native.js
00:46:09.893 | at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
00:46:09.893 | at Module._load (node:internal/modules/cjs/loader:984:27)
00:46:09.894 | at Module.require (node:internal/modules/cjs/loader:1231:19)
00:46:09.894 | at require (node:internal/modules/helpers:179:18)
00:46:09.894 | at requireWithFriendlyError (/vercel/path0/node_modules/rollup/dist/native.js:41:10)
00:46:09.894 | at Object. (/vercel/path0/node_modules/rollup/dist/native.js:68:76)
00:46:09.894 | at Module._compile (node:internal/modules/cjs/loader:1369:14)
00:46:09.894 | at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
00:46:09.894 | at Module.load (node:internal/modules/cjs/loader:1206:32)
00:46:09.894 | at Module._load (node:internal/modules/cjs/loader:1022:12) {
00:46:09.894 | code: 'MODULE_NOT_FOUND',
00:46:09.894 | requireStack: [ '/vercel/path0/node_modules/rollup/dist/native.js' ]
00:46:09.894 | }
00:46:09.894 | }
00:46:09.894 |
00:46:09.895 | Node.js v20.12.2
00:46:09.904 | Error: Command "npm run build" exited with 1
00:46:10.339
Any idea of what commands should I use for Build Command or Install Command
Contributor guide
No contributing guide indexed for this repository
Research direction
The error is a missing optional dependency in rollup during a Vercel build. Look at the project's package.json and package-lock.json to understand the dependency tree. Check the build script in package.json and Vercel configuration files. The fix likely involves adjusting the lockfile or build commands to resolve the npm bug mentioned.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, rollup, typescript
- Domain
- build-system, ci-cd
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100