简体   繁体   English

错误:尝试安装 react 应用程序时找不到模块“react-scripts/scripts/init.js”

[英]Error: cannot find module "react-scripts/scripts/init.js' when tryping to install react app

I'm getting this issue when creating a new project, no idea what's really happening it's annoying.我在创建一个新项目时遇到了这个问题,不知道到底发生了什么,这很烦人。 I tried to clean the cache, update the create-react-app, but still, the same thing happens.我试图清理缓存,更新 create-react-app,但仍然发生了同样的事情。 Thanks in advance!提前致谢!

Image of Issue, screenshot:问题图片,截图:

问题图像,屏幕截图

I am new at Node.js like you but try:我和你一样是 Node.js 新手,但请尝试:

  1. run npm init , in VS code terminal在 VS 代码终端中运行npm init
  2. npm i react-scripts (if you didn't install) npm i react-scripts (如果你没有安装)

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

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