Comments (3)
same issue here for my sveltekit project with static adapter and bun
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.
--
02:29:29.626 | at requireWithFriendlyError (/vercel/path0/node_modules/vite/node_modules/rollup/dist/native.js:59:9)
02:29:29.626 | at Object.<anonymous> (/vercel/path0/node_modules/vite/node_modules/rollup/dist/native.js:68:76)
02:29:29.626 | ... 3 lines matching cause stack trace ...
02:29:29.626 | at Module._load (node:internal/modules/cjs/loader:1022:12)
02:29:29.626 | at cjsLoader (node:internal/modules/esm/translators:366:17)
02:29:29.626 | at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:315:7)
02:29:29.626 | at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
02:29:29.626 | at async ModuleLoader.import (node:internal/modules/esm/loader:323:24) {
02:29:29.626 | [cause]: Error: Cannot find module '@rollup/rollup-linux-x64-gnu'
02:29:29.626 | Require stack:
02:29:29.627 | - /vercel/path0/node_modules/vite/node_modules/rollup/dist/native.js
02:29:29.627 | at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
02:29:29.627 | at Module._load (node:internal/modules/cjs/loader:984:27)
02:29:29.627 | at Module.require (node:internal/modules/cjs/loader:1231:19)
02:29:29.627 | at require (node:internal/modules/helpers:179:18)
02:29:29.627 | at requireWithFriendlyError (/vercel/path0/node_modules/vite/node_modules/rollup/dist/native.js:41:10)
02:29:29.627 | at Object.<anonymous> (/vercel/path0/node_modules/vite/node_modules/rollup/dist/native.js:68:76)
02:29:29.627 | at Module._compile (node:internal/modules/cjs/loader:1369:14)
02:29:29.627 | at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
02:29:29.627 | at Module.load (node:internal/modules/cjs/loader:1206:32)
02:29:29.627 | at Module._load (node:internal/modules/cjs/loader:1022:12) {
02:29:29.627 | code: 'MODULE_NOT_FOUND',
02:29:29.627 | requireStack: [
02:29:29.627 | '/vercel/path0/node_modules/vite/node_modules/rollup/dist/native.js'
02:29:29.627 | ]
02:29:29.627 | }
02:29:29.627 | }
02:29:29.627 |
02:29:29.627 | Node.js v20.12.2
02:29:29.632 | error: script "build" exited with code 1
02:29:29.636 | Error: Command "bun run build" exited with 1
from vercel.
same issue here for my sveltekit project with static adapter and bun
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. -- 02:29:29.626 | at requireWithFriendlyError (/vercel/path0/node_modules/vite/node_modules/rollup/dist/native.js:59:9) 02:29:29.626 | at Object.<anonymous> (/vercel/path0/node_modules/vite/node_modules/rollup/dist/native.js:68:76) 02:29:29.626 | ... 3 lines matching cause stack trace ... 02:29:29.626 | at Module._load (node:internal/modules/cjs/loader:1022:12) 02:29:29.626 | at cjsLoader (node:internal/modules/esm/translators:366:17) 02:29:29.626 | at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:315:7) 02:29:29.626 | at ModuleJob.run (node:internal/modules/esm/module_job:222:25) 02:29:29.626 | at async ModuleLoader.import (node:internal/modules/esm/loader:323:24) { 02:29:29.626 | [cause]: Error: Cannot find module '@rollup/rollup-linux-x64-gnu' 02:29:29.626 | Require stack: 02:29:29.627 | - /vercel/path0/node_modules/vite/node_modules/rollup/dist/native.js 02:29:29.627 | at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15) 02:29:29.627 | at Module._load (node:internal/modules/cjs/loader:984:27) 02:29:29.627 | at Module.require (node:internal/modules/cjs/loader:1231:19) 02:29:29.627 | at require (node:internal/modules/helpers:179:18) 02:29:29.627 | at requireWithFriendlyError (/vercel/path0/node_modules/vite/node_modules/rollup/dist/native.js:41:10) 02:29:29.627 | at Object.<anonymous> (/vercel/path0/node_modules/vite/node_modules/rollup/dist/native.js:68:76) 02:29:29.627 | at Module._compile (node:internal/modules/cjs/loader:1369:14) 02:29:29.627 | at Module._extensions..js (node:internal/modules/cjs/loader:1427:10) 02:29:29.627 | at Module.load (node:internal/modules/cjs/loader:1206:32) 02:29:29.627 | at Module._load (node:internal/modules/cjs/loader:1022:12) { 02:29:29.627 | code: 'MODULE_NOT_FOUND', 02:29:29.627 | requireStack: [ 02:29:29.627 | '/vercel/path0/node_modules/vite/node_modules/rollup/dist/native.js' 02:29:29.627 | ] 02:29:29.627 | } 02:29:29.627 | } 02:29:29.627 | 02:29:29.627 | Node.js v20.12.2 02:29:29.632 | error: script "build" exited with code 1 02:29:29.636 | Error: Command "bun run build" exited with 1
I fixed this issue by changing sveltekit adapter from static to vercel
from vercel.
Not a Vercel bug, it's npm/cli#4828, as the error suggests.
There are a few solutions in that thread but they might not work
from vercel.
Related Issues (20)
- Console Logs Merging into a Single Message in Dashboard when Using ESModules
- [cli] Removing VERCEL_ENV in [email protected] is a breaking change HOT 4
- The Starlette lifespan async context manager is not executed
- I am tryping to deploy my web project on vercel HOT 2
- Not able to apply custom timeline for my project logs HOT 1
- Fetch failed with UND_ERR_CONNECT_TIMEOUT error on Next.js serverless function on Vercel Production env HOT 44
- [BUG] Vercel CLI shows Next.js error if page begins with `api-`, even if Next.js is not present in project
- next.js app with two API servers
- Vercel Promote CLI not respecting Team-Scoped Vercel Token HOT 1
- [BUG] Router.back() does not work when history contains query parameters
- vercel.json not overriding project settings
- [Bug]: Text goes hidden when selected HOT 1
- [BUG]: Flask Server will not update domain HOT 1
- Ak vercel
- Several examples expose some internal files via static assets HOT 1
- Node engine not using latest minor version HOT 1
- [Bug] Categories button not working on mobile devices in blog section HOT 1
- need update : some of the packages nextjs use has been deprecated HOT 1
- Serverless function crashed — express app, issue on obsfucation of Javascript.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vercel.