首页 > 解决方案 > 在 npm install 中找不到 Esprima 错误 404

问题描述

我正在尝试在我的 react 项目中安装所有依赖项,但是当我运行 npm install 时,我遇到了一些与 esprima 相关的错误:

npm ERR! 404 Not Found - GET https://codeload.github.com/ariya/esprima/legacy.tar.gz/master
npm ERR! npm ERR! 404 
npm ERR! npm ERR! 404  'esprima@https://github.com/ariya/esprima/tarball/master' is not in the npm registry.
npm ERR! npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! npm ERR! 404 
npm ERR! npm ERR! 404 Note that you can also install from a
npm ERR! npm ERR! 404 tarball, folder, http url, or git url.

有没有人遇到过这个错误?

标签: reactjsnpmesprima

解决方案


将我的 npm 版本从 7.14.0 降级到 v6.14.13 后,我能够解决此问题。这可能不是最好的解决方案,但这是我摆脱这个问题的唯一方法。


推荐阅读