如何解决此npm开始无法正常工作(npx create-react-app之后) [英] how to fix this npm start not working ( after npx create-react-app )

查看:162
本文介绍了如何解决此npm开始无法正常工作(npx create-react-app之后)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! todos-clone-app@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the todos-clone-app@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/josh/.npm/_logs/2020-08-21T19_28_35_521Z-debug.log


编辑:

package.json

{
  "name": "todos-clone-app",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.5.0",
    "@testing-library/user-event": "^7.2.1",
    "react": "^16.13.1",
    "react-dom": "^16.13.1",
    "react-scripts": "3.4.3",
    "webpack-dev-server": "^3.11.0"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": {
    "production": [ ">0.2%", "not dead", "not op_mini all" ],
    "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ]
  }
}


推荐答案

尝试删除您的 node_modules 目录和 package-lock.json 文件。然后运行 npm install

Try deleting your node_modules directory and package-lock.json file. Then run npm install.

这篇关于如何解决此npm开始无法正常工作(npx create-react-app之后)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆