-
-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Cannot find module @rollup/rollup-darwin-x64 on MAC with M3 processor #435
Comments
Does Vitest work for you without the extension? |
Running vitest in the terminal without the extension works fine. |
If it helps, vitest extension version v0.5.15 used to work when using vitest 1.4.0, however this version of the extension is not available anymore for download it seems and also it doesn't work with vitest latest 2.0.1 |
It doesn't really help. I don't think the problem is with OS, I will need a minimal reproduction to looks into this. Try creating a simple project - does it work on your PC out of the box? |
The extension does work with the simple project so must be something in my repo that is causing it to crash. Weird that this didn't happen with v0.5.15. I'll look more into it on my side. Thanks for the quick response. |
Maybe you don't have the config in the root? The extension uses the config directory as cwd, - maybe that's why it can't find the package? |
I actually found the problematic package. We are using rsbuild instead of vite for actually building the project and it looks like @rspack/binding-darwin-arm64 was somehow interfering. Updating this package to latest version seems to have fixed my issue. |
Describe the bug
I installed vitest extension and I get error
"Error: Vitest failed to start:
Error: Cannot find module @rollup/rollup-darwin-x64"
I have an Apple M3 Pro processor and cannot install @rollup/rollup-darwin-x64 lib. I tried installing @rollup/rollup-darwin-arm64, but that didn't fix the issue.
Reproduction
Install latest version of vitest extension v1.0.1, vite 5.3.3 and vitest 2.0.1 on a MAC that uses M3 processor, OS darwin and arm64 CPU. Start VSCode.
You'll see error in the Output. Deleting package lock and node modules and running "npm i" again doesn't fix issue.
Error: Vitest failed to start:
Error: Cannot find module @rollup/rollup-darwin-x64. npm has a bug related to optional dependencies (npm/cli#4828). Please try
npm i
again after removing both package-lock.json and node_modules directory.at requireWithFriendlyError (/Users/oana.badiu/Code/directions-debug-v2/node_modules/rollup/dist/native.js:59:9)
at Object. (/Users/oana.badiu/Code/directions-debug-v2/node_modules/rollup/dist/native.js:68:76)
at Module._compile (node:internal/modules/cjs/loader:1378:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1437:10)
at Module.load (node:internal/modules/cjs/loader:1212:32)
at Module._load (node:internal/modules/cjs/loader:1028:12)
at cjsLoader (node:internal/modules/esm/translators:359:17)
at ModuleWrap. (node:internal/modules/esm/translators:308:7)
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
at ChildProcess.f (/Users/oana.badiu/.vscode/extensions/vitest.explorer-1.0.1/dist/extension.js:18:5548)
at ChildProcess.emit (node:events:514:28)
at emit (node:internal/child_process:951:14)
at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
Output
Version
v1.0.1
Validations
The text was updated successfully, but these errors were encountered: