0

I am trying to run create-react-app in my command line, and I keep getting this message:

"You are using npm 2.15.12 so the project will be boostrapped with an old unsupported version of tools."

I ran

sudo npm install npm@latest -g

to make sure I have the latest version of npm (I also tried "sudo npm install -g npm"). And when I run

npm -v

the output is "6.4.1"

I get a number of errors during the create-react-app process, but the app itself seems to work fine, "npm start" works and all the files seem to be in the right place, but I don't want to run into more errors down the road.

After a couple hours of searching, I can't find any other issues of create-react-app using the wrong version of npm. Is there a way to change the version of npm being used while using create-react-app?

The hidden code snippet below lists the errors that I get during create-react-app. I feel like they might be due to using the outdated version of npm.

node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.17/fse-v1.0.17-node-v67-darwin-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v67 ABI) (falling back to source compile with node-gyp) 
node-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.17/fse-v1.0.17-node-v67-darwin-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v67 ABI) (falling back to source compile with node-gyp) 

gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/myuser/node_modules/npm/node_modules/node-gyp/lib/build.js:285:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 17.4.0
 
gyp ERR! node -v v11.0.0
gyp ERR! node-gyp -v v3.6.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute

0

2 Answers 2

1

Solved. I believe I had some extra node files floating around (potentially from installations I didn't do correctly). I decided to do a complete removal of nvm/node/npm and get a fresh install (I am on a mac).

To remove nvm and node, I removed all node and node_package files in /usr (there are quite a few tutorials on where to find node files and folders). I followed the guides but also had a few exceptions. I had a folder that was simply named "n" that had some node files in it (which I then deleted) and then had to show my hidden files to find an ".nvm" folder in /users/userName. I deleted the ".nvm" folder and was finally able to completely get rid of nvm, node and npm.

After I freshly installed nvm and node (I had to remake the .nvm folder for the nvm install script to work), the create-react-app command is working correctly.

Sign up to request clarification or add additional context in comments.

Comments

0

You need to update your npm version using this:

npm install -g npm

Please note that this command will remove your current version of npm. Make sure to use

sudo npm install -g npm 

if on a Mac.

1 Comment

Thanks for the reply divakar! I tried using sudo npm install -g npm (I am on a Mac), which ran without any issues. I'm still getting "6.4.1" when i run npm -v, and getting the same "You are using npm 2.15.12" when running npx create-react-app. Any other ideas to get npx create-react-app to use the correct npm version?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.