-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Cannot find module @rollup/rollup-win - nuxt 3 - npm install fail #5325
Copy link
Copy link
Closed
Labels
Description
Rollup Version
4.9.2
Operating System (or Browser)
Windows 11
Node Version (if applicable)
20.10.0
Link To Reproduction
https://github.com/JulienHenrotin/testNuxt3
Expected Behaviour
I can no longer launch my Nuxt 3 project due to Rollup package
I cloned my web project into a machine with a fresh Windows 11 installation but I'm unable to get past the package installation step.
Before this, I installed Node using NVM (Node Version Management).
After clone project I just have to install dependencies before run the project.
Environment
- Operating System: Windows_NT
- Node Version: v20.10.0
- Nuxt Version: 3.8.2
- CLI Version: 3.10.0
- Nitro Version: 2.8.1
- Package Manager: npm@10.2.3
- Builder: -
- User Config: typescript, app, nitro, runtimeConfig, modules, htmlValidator
- Runtime Modules: @nuxtjs/tailwindcss@6.10.1, @nuxtjs/google-fonts@3.1.3, @nuxtjs/html-validator@1.6.0, @vueuse/nuxt@10.7.0, @nuxtjs/i18n@8.0.0-beta.9, nuxt-icons@3.2.1, @nuxt/image@1.1.0, @nuxtjs/fontaine@0.4.1, nuxt-schema-org@3.2.1, nuxt-delay-hydration@1.3.3
Actual Behaviour
When I run npm install, I get the following error:
[15:25:31] ERROR Cannot find module @rollup/rollup-win32-x64-msvc. 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.
at requireWithFriendlyError (node_modules\rollup\dist\native.js:87:9)
at Object.<anonymous> (node_modules\rollup\dist\native.js:96:48)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at cjsLoader (node:internal/modules/esm/translators:345:17)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:294:7)
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
[15:25:31] ERROR Cannot find module @rollup/rollup-win32-x64-msvc. 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.
npm ERR! code 1
npm ERR! path C:\Users\julie\Downloads\my_project
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c nuxt prepare
What I tried:
- deleting the node_module folder, cache, and package.lock
- testing other versions of node (17.9.1, 18.19.0, 19.9, 20.10)
- installing Node in the traditional way without NVM
- changing the version of Rollup
"overrides": {"rollup": "4.6.1"} - change nuxt version to 3.9.0
- create new empty nuxt project
Reactions are currently unavailable