T
TanStack6mo ago
afraid-scarlet

Netlify deployment error cannot find module @rollup/rollup-linux-x64-gnu

Is anyone here facing the same problem I am getting when deploying to Netlify? vinxi v0.5.3 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.
GitHub
Issues · npm/cli
the package manager for JavaScript. Contribute to npm/cli development by creating an account on GitHub.
4 Replies
stormy-gold
stormy-gold6mo ago
did you try what it suggests?
afraid-scarlet
afraid-scarletOP6mo ago
Yes, did not work. I also get the same error now in vercel. actually installing that package won't work in my macbook m1 machine because that package is for linux server.
genetic-orange
genetic-orange6mo ago
try pnpm?
afraid-scarlet
afraid-scarletOP6mo ago
It works now. I put them in optionalDependencies property in the package.json.

Did you find this page helpful?