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

前端 未结 22 1763
孤城傲影
孤城傲影 2020-12-24 11:51

I am trying to set up react app using create-react-app command on windows pc. I already used it on my mac computer, and it works well. But I encounter a problem. Here my ste

22条回答
  •  悲&欢浪女
    2020-12-24 12:48

    This is a windows variable path problem, i have faced the same problem recently, the following are possible root cause of the problem , installing node via nvm(node version manager) so to solve the issue in this case you after running npm install -g create-react-app got to the location in my case C:\Users\pc\AppData\Roaming\npm in the copy create-react-app to C:\Users\pc\AppData\Roaming\nvm\v12.18.3 and also move the folder in node_module folder called create-react-app to the specific version you are using under nvm , after that you should be able to use create-react-app without and issue. i hope this will help someone

提交回复
热议问题