Repository navigation
Closed
Labels
Description
Describe the bug
I researched and tried on the sites below and on many different platforms, but I could not find a solution. I am using node:lts and also I cannot download this module in my docker container due to system incompatibility.
So I honestly don't know what to do right now.
#15120
rollup/rollup#5194
#15167
Reproduction
https://stackblitz.com/edit/vite-yxshfw?file=docker-compose.yml,package.json
Steps to reproduce
No response
System Info
System:
2024-01-03 10:37:37 my-app | OS: Linux 5.15 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
2024-01-03 10:37:37 my-app | CPU: (12) x64 AMD Ryzen 5 4600H with Radeon Graphics
2024-01-03 10:37:37 my-app | Memory: 5.12 GB / 7.45 GB
2024-01-03 10:37:37 my-app | Container: Yes
2024-01-03 10:37:37 my-app | Shell: 5.2.15 - /bin/bash
2024-01-03 10:37:37 my-app | Binaries:
2024-01-03 10:37:37 my-app | Node: 20.10.0 - /usr/local/bin/node
2024-01-03 10:37:37 my-app | Yarn: 1.22.19 - /usr/local/bin/yarn
2024-01-03 10:37:37 my-app | npm: 10.2.3 - /usr/local/bin/npm
2024-01-03 10:37:37 my-app | npmPackages:
2024-01-03 10:37:37 my-app | @vitejs/plugin-vue: ^4.5.2 => 4.5.2
2024-01-03 10:37:37 my-app | vite: ^5.0.10 => 5.0.10Used Package Manager
npm
Logs
2024-01-03 11:02:35 my-app |
2024-01-03 11:02:35 my-app | > my-app@0.6.0 dev
2024-01-03 11:02:35 my-app | > npx vite
2024-01-03 11:02:35 my-app |
2024-01-03 11:02:37 my-app | /usr/src/app/node_modules/rollup/dist/native.js:87
2024-01-03 11:02:37 my-app | throw new Error(
2024-01-03 11:02:37 my-app | ^
2024-01-03 11:02:37 my-app |
2024-01-03 11:02:37 my-app | 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.
2024-01-03 11:02:37 my-app | at requireWithFriendlyError (/usr/src/app/node_modules/rollup/dist/native.js:87:9)
2024-01-03 11:02:37 my-app | at Object.<anonymous> (/usr/src/app/node_modules/rollup/dist/native.js:96:48)
2024-01-03 11:02:37 my-app | ... 3 lines matching cause stack trace ...
2024-01-03 11:02:37 my-app | at Module._load (node:internal/modules/cjs/loader:1023:12)
2024-01-03 11:02:37 my-app | at cjsLoader (node:internal/modules/esm/translators:345:17)
2024-01-03 11:02:37 my-app | at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:294:7)
2024-01-03 11:02:37 my-app | at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
2024-01-03 11:02:37 my-app | at async ModuleLoader.import (node:internal/modules/esm/loader:329:24) {
2024-01-03 11:02:37 my-app | [cause]: Error: Cannot find module '@rollup/rollup-linux-x64-gnu'
2024-01-03 11:02:37 my-app | Require stack:
2024-01-03 11:02:37 my-app | - /usr/src/app/node_modules/rollup/dist/native.js
2024-01-03 11:02:37 my-app | at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
2024-01-03 11:02:37 my-app | at Module._load (node:internal/modules/cjs/loader:985:27)
2024-01-03 11:02:37 my-app | at Module.require (node:internal/modules/cjs/loader:1235:19)
2024-01-03 11:02:37 my-app | at require (node:internal/modules/helpers:176:18)
2024-01-03 11:02:37 my-app | at requireWithFriendlyError (/usr/src/app/node_modules/rollup/dist/native.js:69:10)
2024-01-03 11:02:37 my-app | at Object.<anonymous> (/usr/src/app/node_modules/rollup/dist/native.js:96:48)
2024-01-03 11:02:37 my-app | at Module._compile (node:internal/modules/cjs/loader:1376:14)
2024-01-03 11:02:37 my-app | at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
2024-01-03 11:02:37 my-app | at Module.load (node:internal/modules/cjs/loader:1207:32)
2024-01-03 11:02:37 my-app | at Module._load (node:internal/modules/cjs/loader:1023:12) {
2024-01-03 11:02:37 my-app | code: 'MODULE_NOT_FOUND',
2024-01-03 11:02:37 my-app | requireStack: [ '/usr/src/app/node_modules/rollup/dist/native.js' ]
2024-01-03 11:02:37 my-app | }
2024-01-03 11:02:37 my-app | }
2024-01-03 11:02:37 my-app |
2024-01-03 11:02:37 my-app | Node.js v20.10.0
my-app exited with code 1
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Activity
bolt-new-by-stackblitz commentedon Jan 3, 2024
0xBeycan commentedon Jan 3, 2024
If i try yarn rollup fixing but esbuild giving error :D
Lymah123 commentedon Jan 3, 2024
Hi- Has anyone started working on this issue?
0xBeycan commentedon Jan 4, 2024
@Lymah123 You can change package manager to yarn and this line add to package.json
and for vite.config.js you can try this
Can you confirm is works or not for you?
Lymah123 commentedon Jan 5, 2024
Hi @BeycanDeveloper, sorry for the late response. I will check it out and let you know.
fix vitejs/vite#15492
fix vitejs/vite#15492