Giter Site home page Giter Site logo

Comments (3)

IslamZaoui avatar IslamZaoui commented on September 27, 2024

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.

IslamZaoui avatar IslamZaoui commented on September 27, 2024

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.

fregante avatar fregante commented on September 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.