Home > OS >  NPM / NodeJS command prompt errors
NPM / NodeJS command prompt errors

Time:08-03

I have been trying to look for answers all over and I cannot find any.. Whenever I go to create a react app, (I use visual studio code) I will type in the terminal (I do the NPX lowercase but stack overflow wouldn't let me post if lowercase) NPX create-react-app title and it will open up a new command prompt for a split second then just close.. all i get to see is an error called NPM WARN then it closes.. This happens for almost all NPM commands I do.. Is there any way I can fix this, it is really starting to get annoying.

CodePudding user response:

Since the cause of the error is not clear, first try

npm init react-app my-app

command be sure using npm version 6 or higher. If it doesn't work try

npm install -g create-react-app

then use

npx create-react-app hello-world

command again.

If none of this commands work, you can uninstall npm and other libraries, frameworks related to react then install the last stable versions of them.

  • Related