无法安装 redux-mock-store:404 Not Found - GET lodash.isplainobject

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

我正在尝试使用 npm 安装 redux-mock-store。
我使用的是节点 16.10.0。 但是,我不断收到此错误:

npm ERR! code E404
npm ERR! 404 Not Found - GET https://packagecloud.io/github/git-lfs/npm/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz
npm ERR! 404 
npm ERR! 404  'lodash.isplainobject@https://packagecloud.io/github/git-lfs/npm/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ahmed/.npm/_logs/2023-10-30T16_21_48_489Z-debug-0.log

其他模块安装正常。不知道这里发生了什么。

node.js npm lodash redux-mock-store packagecloud.io
1个回答
0
投票

原来这是节点兼容性问题。
我切换到节点 14 并且成功了。

不知道为什么会这样。但是,它解决了它。

如果您遇到这种情况,您可能需要切换到特定版本的节点。

如果有人能解释为什么切换到节点可以解决这个问题,请告诉我。因为这个问题已经发生过很多次了。我总是通过切换节点版本来解决它。

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