简体   繁体   中英

I can not start a server with react scripts using both npm and yarn?

I tried literally everything, removing node_modules dozens of times, removing webpack-dev-server and all webpack packages , tried both npm and yarn , downgrading react-scripts and still the problem exist, i can not start a server in my project folder. this is my package.json file:

{
  "name": "test",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "react": "^16.11.0",
    "react-dom": "^16.11.0",
    "react-scripts": "^3.0.0"
  },
  "scripts": {
    "start": "react-scripts start",
    "test": "react-scripts test"
  }
}

And i get that error always: error Command failed with exit code 1.

What can be wrong in my project folder, why server can not be started??

Which environment do you have? You can try this and this

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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