简体   繁体   English

在npm上启动启动应用程序时出错

[英]Getting error on npm start create-react-app

I am currently learning React. 我目前正在学习React。 I have done: 我已经做好了:

  • npm i -g create-react-app (sucessful) npm i -g create-react-app (成功)
  • create-react-app react-app (sucessful) create-react-app react-app (成功)
  • cd react-app
  • npm start (error above) npm start (上面的错误)

Output: 输出:

  • npm start \\Git\\cmd was unexpected .at this time. 此时,npm start \\ Git \\ cmd是意外的。

  • npm ERR! npm ERR! code ELIFECYCLE 代码ELIFECYCLE

So, what I have tried by searching online: 因此,我尝试通过在线搜索进行尝试:

  • npm cache clean --force
  • delete node_modules 删除node_modules
  • delete package-lock.json 删除package-lock.json
  • npm run clear
  • npm install npm安装

None solved. 没有解决。 I have read that I should not installed globally but now that it is already instaled (?) can I rollback? 我读过我不应该在全球范围内安装,但是现在已经安装了(?),可以回滚吗? I can't run npm ig create-react-app again. 我无法再次运行npm ig create-react-app。 Thank you 谢谢

Edit: Added screenshot https://i.ibb.co/mNKLskX/Capturar.png 编辑:添加了截图https://i.ibb.co/mNKLskX/Capturar.png

with npm try init 使用npm试试init

npm init react-app my-app

or, try npx : 或者,尝试npx

npx create-react-app my-app

cd my-app

npm start

Have you tried to follow the steps from 'create-react-app'? 您是否尝试按照“ create-react-app”中的步骤进行操作?

`To create a new app, you may choose one of the following methods: `要创建新应用,您可以选择以下方法之一:

npx 像素

 npx create-react-app my-app

(npx comes with npm 5.2+ and higher, see instructions for older npm versions) (npx随npm 5.2及更高版本一起提供,请参阅旧版npm的说明)

npm npm

npm init react-app my-app

npm init is available in npm 6+ npm init可在npm 6+中使用

Yarn

yarn create react-app my-app

yarn create is available in Yarn 0.25+` 在纱线0.25+中可以使用yarn create

To have more info: https://github.com/facebook/create-react-app 要了解更多信息,请访问: https : //github.com/facebook/create-react-app

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

相关问题 使用Npm start启动项目期间在Project中获取错误,使用create-react-app创建项目 - Getting Error in Project during start project with Npm start, Project created with create-react-app create-react-app 和 npm 启动时出现错误“找不到模块” - Error "Module not found" while create-react-app and npm start 在创建反应项目时在“npx create-react-app my-app”之后运行命令“npm start”时出错 - getting error when run command 'npm start' after 'npx create-react-app my-app' in creating a react project 使用 npm 安装 create-react-app 时出错 - Error installing create-react-app with npm 运行 npm 启动和使用 npx create-react-app 创建 React 应用程序时出错 - Error running npm start and creating React application using npx create-react-app 可以用 Nodejs 开头的 Create-React-App npm 吗? - Can you use Create-React-App npm start with nodejs? 将 Nginx 与 Create-React-App 开发服务器和 npm start 结合使用 - Using Nginx with Create-React-App dev server and npm start 无法运行 NPM 在 create-react-app 之后启动 - Not able to run NPM Start after create-react-app npm 使用 create-react-app 时启动不运行 - npm start not running when using create-react-app create-react-app npm start错误:找不到模块'@ webassemblyjs / ast' - create-react-app npm start Error: Cannot find module '@webassemblyjs/ast'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM