我在尝试创建一个react应用程序时,在我的shell中不断出现这个E404错误。我可能像个菜鸟一样从我的计算机中删除了重要文件。我尝试过使用npm set registry https://registry.npmjs.org
的可能解决方案,但没有帮助。我一直在寻找解决这个问题的方法,但还没有找到解决方案。有人遇到过这个问题吗?有什么建议吗?谢谢阅读!npm get registry
返回https://skimdb.npmjs.com/registry
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.
2条答案
按热度按时间tjjdgumg1#
尝试以下命令(注意配置)
NPM registry docs
nzk0hqpo2#
如果你已经全局安装了
create-react-app
。卸载它使用然后运行: