【发布时间】:2022-11-21 04:57:02
【问题描述】:
尝试创建 React 应用程序时,我的 shell 中不断出现此 E404 错误。我可能像一个绝对的菜鸟一样从我的电脑中删除了重要文件。我尝试过的一种可能的解决方案是使用npm set registry https://registry.npmjs.org,但这没有帮助。我一直在寻找解决此问题的方法,但尚未找到解决方案。有没有人遇到过这个?有什么建议吗?谢谢阅读!
Creating a new React app in /home/elilogbro/portfolio.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
npm ERR! code E404
npm ERR! 404 Not Found - GET https://skimdb.npmjs.com/registry/lodash.sortby/-/lodash.sortby-4.7.0.tgz - not_found
npm ERR! 404
npm ERR! 404 'lodash.sortby@https://skimdb.npmjs.com/registry/lodash.sortby/-/lodash.sortby-4.7.0.tgz' is not in this registry.
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/elilogbro/.npm/_logs/2022-11-20T20_32_00_327Z-debug-0.log
Aborting installation.
npm install --no-audit --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.
Deleting generated file... package.json
Deleting portfolio/ from /home/elilogbro
Done.
【问题讨论】:
-
Please don't post pictures of text。相反,将文本本身复制到您的帖子中,edit,并使用格式工具,如code formatting。
-
@wjandrea 修复了它,感谢您的反馈!
标签: reactjs