繁体   English   中英

反应 - 安装时不工作 npm

[英]REACT - not working npm while installing it

命令行上的所有命令是否从全局安装 npm npm install -g create-react-app以及以下代码:

npx create-react-app <myprojectname>并且还清除了 npm 缓存,但它总是卡在图像中显示以下错误的行上。 随着错误:

┌──────────────────────────────────────────────────────────────────┐
│                     npm update check failed                      │
│               Try running with sudo or get access                │
│               to the local update config store via               │
│ sudo chown -R $USER:$(id -gn $USER) C:\Users\Smart Sites\.config │
└──────────────────────────────────────────────────────────────────

连同65 packages are looking for funding [1]: https://i.stack.imgur.com/KJVVp.png

这是我从创建反应应用程序的入门页面中找到的内容。

如果您以前通过以下方式全局安装了 create-react-app

  npm install -g create-react-app,

我们建议您卸载 package 使用

 npm uninstall -g create-react-app

确保 npx 始终使用最新版本。

npx create-react-app my-app
cd my-app
npm start

但在使用 npx 之前,请始终确保您有一个现有的文件夹。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM