npm 安装给出错误:路径规范'4.0'与 git 已知的任何文件都不匹配



我从GitHub克隆了一个松露项目,在执行npm install时收到以下错误:

npm ERR! command /opt/homebrew/Cellar/node/17.3.0/bin/node /opt/homebrew/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/Users/rohit12242/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm ERR! code 1
npm ERR! npm ERR! The git reference could not be found
npm ERR! npm ERR! command git --no-replace-objects checkout 4.0
npm ERR! npm ERR! error: pathspec '4.0' did not match any file(s) known to git
npm ERR! 
npm ERR! npm ERR! A complete log of this run can be found in:

我安装了节点版本11并修复了这个错误

相关内容

最新更新