I am running npm uninstall create-react-app
, and it returns
npm WARN saveError ENOENT: no such file or directory, open '/Users/me/Documents/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/me/Documents/package.json'
npm WARN Documents No description
npm WARN Documents No repository field.
npm WARN Documents No README data
npm WARN Documents No license field.
I want to update my create-react-app version, and apparently they no longer support global installs. When I installed CRA the first time (a while ago), it was installed globally. Now, I am trying to update it, and I'm running into issues. I ran npm update create-react-app
, however my terminal just blinks for a second and returns to the prompt. I, therefore, decided to uninstall create-react-app
altogether and reinstall it, however now I'm running into the above warnings/issues.
Any thoughts on what may be going on?
Edit:
When I run npm i create-react-app
, it also throws the above WARN
s, but it also says
+ [email protected] // <---
added 1 package and audited 578 packages in 1.787s
However, when I run the command create-react-app --version
again, it says 3.2.0
Edit 2:
I've ran npm i -g create-react-app
several times, but that throws:
Michaels-MacBook-Pro:Documents me$ npm i -g create-react-app
npm ERR! code EEXIST
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/create-react-app/index.js
npm ERR! dest /usr/local/bin/create-react-app
npm ERR! errno -17
npm ERR! EEXIST: file already exists, symlink '../lib/node_modules/create-react-app/index.js' -> '/usr/local/bin/create-react-app'
npm ERR! File exists: /usr/local/bin/create-react-app
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/me/.npm/_logs/2019-12-23T08_07_29_158Z-debug.log
After globally uninstalling create-react-app
, I was still getting an error that my create-react-app
was out of date. Here's what solved that for me:
After
sudo npm uninstall -g create-react-app
Run
npx clear-npx-cache
Then try reinstalling create-react-app
in the proper working directory:
npx create-react-app my-app
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With