npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated bcrypt@4.0.1: versions < v5.0.0 do not handle NUL in passwords properly
npm ERR! code 1
npm ERR! path /Users/nikhil/Desktop/admin/myprivatescout-master/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@16.6.1.
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/nikhil/.npm/_logs/2021-08-23T17_20_39_011Z-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/nikhil/Desktop/admin/myprivatescout-master/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/nikhil/Desktop/admin/myprivatescout-master/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:1067: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/nikhil/Desktop/admin/myprivatescout-master/node_modules/node/installArchSpecificPackage.js'
npm ERR! ]
npm ERR! }
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/nikhil/.npm/_logs/2021-08-23T17_20_39_074Z-debug.log
我无法在我的mac M1上安装我的项目库中的任何包,已经删除了node_modules和package-lock.json,并在那之后尝试了npm i。
尝试运行npm i,npm i为个别软件包,但无法修复它,也尝试安装与Yarn,但我面临着同样的问题。
6条答案
按热度按时间mqxuamgl1#
将体系结构添加到节点:
cedebl8k2#
Nikhil提供的解决方案是一个很好的开始,然而,这更完整,适用于更多的情况:
首先,安装
nvm
(节点版本管理器):然后,运行以下命令:
cnh2zyt33#
我们对这个问题进行了开发,一台M1笔记本电脑在2021年12月买了新的。ralphjsmit的解决方案让我们走上了一部分道路。
我们使用的是Nodejs v16.13.1。运行
arch -x86_64 zsh
后,npm安装仍然失败(Error: Cannot find module 'node-darwin-arm64/package.json'
)。arch
返回了i386
。我们的关键是重新安装Nodejs(通过nvm,
nvm use v16.5.0 && nvm uninstall v16.13.1 && nvm install v16.13.1
)如果要我总结我们执行的所有步骤,它们将是
nfs0ujit4#
重新安装旧版本的NodeJS(& NPM)似乎对我有帮助。请尝试here中的
14.18.3
版本。e3bfsja25#
确保您没有在package.json中指定节点版本。
nbewdwxp6#
arch -arm64 npm i
对我起作用了!