'react-scripts' is not recognized as an internal or external command

前端 未结 18 2264
清歌不尽
清歌不尽 2020-11-30 00:21

I\'ve got a maven project, within which is JavaScript project cloned as a git sub-module. So the directory structure looks something like

mavenapp/src/main/jav

相关标签:
18条回答
  • 2020-11-30 01:00

    I was facing the same problem and i almost spend half on this. This worked for me you can try it

    run

    npm cache clean --force
    

    then

    npm rebuild
    

    finally

    npm install
    

    Good luck

    0 讨论(0)
  • 2020-11-30 01:00

    In my case, the problem had to do with not having enough file permissions for some files the react-scripts package installation was going to write to. What solved it was running git bash as an administrator and then running npm install --save react-scripts again.

    0 讨论(0)
  • 2020-11-30 01:01

    It is an error about react-scripts file missing in your node modules directory at the time of installation.

    Check your react-script dependency is avaliable or not in package.json

    If not available then add manually via:

    npm install react-scripts --save

    0 讨论(0)
  • 2020-11-30 01:01

    In my case , I edited my files on Linux where I had node v14.0.5 installed, when I rebooted to Windows where I had node v14.0.3 I got the same error. So I updated the node version on windows and all went fine for me.

    0 讨论(0)
  • 2020-11-30 01:02

    If react-scripts is present in package.json

    If you see something like this "react-scripts": "2.1.3" in your pakage.json file then just type this command

    npm install

    If react-scripts is not present in package.json

    If there is nothing like "react-scripts" in your package.json file then probably you have not installed it.To do that type the following command and you will be all set

    npm install react-scripts --save

    0 讨论(0)
  • 2020-11-30 01:02

    I faced the same problem. But running the npm update command it's solved my problem.

    0 讨论(0)
提交回复
热议问题