Can't install on Macbook M1
bartolomej opened this issue · comments
Case
- BUG
Issue
I ran npm i
on my Macbook M1 and got the following install error:
npm ERR! code 1
npm ERR! path /Users/bartolomejkozorog/WebstormProjects/best-resume-ever/node_modules/node
npm ERR! command failed
npm ERR! command sh -c node installArchSpecificPackage
npm ERR! npm ERR! code ETARGET
npm ERR! npm ERR! notarget No matching version found for node-darwin-arm64@10.11.0.
npm ERR! npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! npm ERR! notarget a package version that doesn't exist.
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! /Users/bartolomejkozorog/.npm/_logs/2021-11-09T10_16_37_762Z-debug.log
npm ERR! node:internal/modules/cjs/loader:936
npm ERR! throw err;
npm ERR! ^
npm ERR!
npm ERR! Error: Cannot find module 'node-darwin-arm64/package.json'
npm ERR! Require stack:
npm ERR! - /Users/bartolomejkozorog/WebstormProjects/best-resume-ever/node_modules/node/installArchSpecificPackage.js
npm ERR! at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
npm ERR! at Function.resolve (node:internal/modules/cjs/helpers:100:19)
npm ERR! at ChildProcess.<anonymous> (/Users/bartolomejkozorog/WebstormProjects/best-resume-ever/node_modules/node-bin-setup/index.js:18:27)
npm ERR! at ChildProcess.emit (node:events:394:28)
npm ERR! at maybeClose (node:internal/child_process:1064:16)
npm ERR! at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5) {
npm ERR! code: 'MODULE_NOT_FOUND',
npm ERR! requireStack: [
npm ERR! '/Users/bartolomejkozorog/WebstormProjects/best-resume-ever/node_modules/node/installArchSpecificPackage.js'
npm ERR! ]
npm ERR! }
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/bartolomejkozorog/.npm/_logs/2021-11-09T10_16_46_423Z-debug.log
Info
- Operating System:
MacOS Big Sur (v11.6)
- Node-Version:
v16.7.0
andv12.0.0
(tried with both)
Reproduce
Try to run npm i
on ARM platform (ideally Macbook M1).
I deleted node
from package.json
and it works for me. I am able to do npm i
and npm run export
+1 for @caulagi comment, there's a node
dependency installed on package.json pointing to v10.x.x which is incompatible with M1 versions (16 or higher). Tested it on my M1 mac book air and it works!
I confirm that by removing the node
dependency it works on M1.
I removed the node
dependency in the package.json.