npm 错误!代码 EPEERINVALID

问题描述 投票:0回答:1

我是新来的。我收到 - npm ERR!代码 EPEERINVALID (详细信息如下),我当前正在运行以下命令:

  • nvm 0.32.1
  • npm 2.15.9
  • 节点 v4.5.0
  • grunt-cli v1.2.0
  • 咕噜 v0.4.5

并且,在进行软件包或我猜测模块升级时,我收到以下错误...


ERR! Linux 3.16.0-30-generic
npm ERR! argv "/home/i839211/.nvm/versions/node/v4.5.0/bin/node" "/home/i839211/.nvm/versions/node/v4.5.0/bin/npm" "install"
npm ERR! node
 v4.5.0
npm ERR! npm  v2.15.9
npm ERR! 
code EPEERINVALID

npm
 ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!

npm ERR! peerinvalid Peer [email protected] wants grunt@~0.4.1
npm ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.0
npm ERR! peerinvalid Peer [email protected] wants grunt@~0.4.0
npm ERR! peerinvalid Peer [email protected] wants grunt@~0.4.1
npm 
ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.0
npm ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.0
npm ERR! peerinvalid Peer [email protected] wants grunt@>= 0.4.5
npm ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.0
npm ERR! peerinvalid Peer [email protected] wants grunt@~0.4.0
npm ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.0
npm ERR! peerinvalid Peer [email protected] wants grunt@>=0.4.0

npm ERR! Please include the following file with any support request:
npm ERR!     /home/i839211/devfs/adapt_authoring/temp/5638fb3f72f5f640912dc44b/adapt_framework/npm-debug.log

ERROR: 1

我很困惑要做什么,因为我的 grunt 版本 >= 它要求的版本。我做了以下事情:

  • npm 缓存清理
  • rm 节点模块
  • 通过nvm重新安装node/npm

我正在使用 nvm,但之前确实遇到过找不到 npm 的问题,并且我没有使用 nvm 进行了更新。从那时起,我确实尝试清理并使用 nvm 重新安装 - 不确定这是否会出现问题。这里的任何帮助/建议都会很棒。谢谢!

node.js npm gruntjs nvm
1个回答
0
投票

我遇到了这个错误!在 RHEL8.9 下运行 npm install 时的情况。我相信当在同一环境下安装多个版本的 NPM 及其依赖项时,就会出现此错误。是的,我确实清理了我的 NPM 缓存并删除了我的节点模块。

© www.soinside.com 2019 - 2024. All rights reserved.