【问题标题】:I get this error when trying to create a new React application尝试创建新的 React 应用程序时出现此错误
【发布时间】: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.

【问题讨论】:

标签: reactjs


【解决方案1】:

尝试以下命令(不是配置)

npm config set registry https://registry.npmjs.org 

NPM registry docs

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-12-14
    • 2022-11-03
    • 1970-01-01
    • 1970-01-01
    • 2021-11-18
    • 1970-01-01
    相关资源
    最近更新 更多