Create React App not working

前端 未结 15 1344
清歌不尽
清歌不尽 2020-12-29 06:30

Help! I have no idea what is going on here, create react app is not working I have also tried reinstalling and yet to no avail, please help!

Npm version: 5

15条回答
  •  感情败类
    2020-12-29 06:56

    HAD the same problem. Running Node with cra. installed cra -g for starters.

    npm install -g create-react-app
    

    then downgraded react-scripts to version 2.1.8

    npm install react-scripts@2.1.8
    

    created a .env file in root directory and added this to it.

    DB_HOST=localhost
    DB_USER=root
    DB_PASS=s1mpl3
    
    SKIP_PREFLIGHT_CHECK=true
    

    Then you do the typical delete node_modules folder and the package-lock.json file.(NOT PACKAGE.JSON!!!)

    then:

    npm install
    npm start
    

    This worked for me. Sorry I'm not more informative on why this worked for me. I'm still trying to understand why it didn't work in the first place.

提交回复
热议问题