I can't create new app with create-react-app - node.js

I can't fix it no matter what. I have reinstalled node.js probably 8 times. When I google, everyone says run this command npm uninstall -g create-react-app. It didn't get fixed tho. It gives the same problem again and again. I tried npm audit fix --force and every one time it just finds more than 100 vulnerabilities and fixes them again (decreases to 0). I don't know what to do.

I fixed it. After trying many techniques, I somehow got it.
npx --ignore-existing create-react-app
npx create-react-app#latest
That worked for me:
npm uninstall create-react-app
npm update

Related

NPM / NodeJS command prompt errors

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.
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.

Unable to find expo in this project - have you run yarn / npm install yet? Npm has been installed, expo directory exists

My Expo project is pretty much 9999999% errors thus far, and it finally reached its climax when it decided to throw an error I've never heard of at me:
module not found: can't resolve '../utilities/platform'
I've never seen this, and I was explicitly working in an isolated styling file when it occurred. I deleted the file and the error persisted. Seeing that it was in node_modules, I figured that deleting node_modules would be helpful. It wasn't. I deleted the node_modules and tried to run npm i --save afterwards but it kept erroring out. I restarted my computer, deleted the new node_modules, and tried to run npm i --save yet again. This time I was greeted with this:
read-shrinkwrap This version of npm is compatible with lockfileVersion#1, but package-lock.json
was generated for lockfileVersion#2. I'll try to do my best with it!
npm ERR! Maximum call stack size exceeded
Now, I have a half(ish) completed node_modules, and whenever I try to run expo start, which I have about 700000000 times before this, it tells me this...
Unable to find expo in this project - have you run yarn / npm install yet?
Which, yes stupid I have my expo set up, and yes AGAIN, I just ran npm install about twenty-two times. So I have absolutely no idea what happened, why it happened, or how to fix whatever happened. If you can help me I will award you my first born but fair warning that might take another 20 years
Try to remove all react-native data folders from "%appdata%\Temp" and execute following commands:
cd android (if any)
gradlew clean
cd.. and remove the node_modules folder
npm cache clean --force
npm install
npm start -- --reset-cache

Create a React app with express, 'react-scripts' error

I have been following this webpage: https://medium.com/walmartglobaltech/creating-react-redux-express-full-stack-application-part-i-82959d847802
So the first time I ran into some issues so I thought it would be best to start from scratch.The first time I kept getting errors about 'react-scripts' is not recognized. I tried 'npm install react-scripts --save' but that didn't work so I gave up and deleted that project.
But when I made the new one it highlighted a bunch of stuff as wrong. And when I got to 'npm start' it keeps saying, 'react-scripts' is not recognized as an internal or external command. My friend did this and she didn't run into this error. I am new to Node.js anything would be helpful!
things that I've tried that didn't work:
npm install -f
rm -rf node_modules && npm install
npm install --save react-scripts
npm cache clean --force
npm rebuild
npm install
I created a new workspace and it inherited the error- is there a way to delete it all and try again?
-Please help
You can try using yarn. There have been some who solved it this way. I hope you can solve your problem.
yarn add react-scripts
So there were two issues: first my directory needed to be updated and I didn't have the node_modules in my client folder - hope this helps anyone else!
I had similar problem, but I restarted the system and it worked. Don't know exactly what was causing this issue might be a cache issue.

Npm commands downloaded but not recognize

So I recently update node js pretty much since I was gonna try Angular but now when I try to run any command like create-react-app appname I start to get this.
C:\Users\Mine\AppData\Roaming\npm/node_modules/node/bin/node: line 1:
This: command not found
now I checked my Environmental variables and on top of my Path folder I have
C:\Users\Mine\AppData\Roaming\npm which im pretty sure is the correct
path.
I've tried to change the path to programfiles\node and it did not work as well.
i think you should after update node js uninstall create-react-app
npm uninstall create-react-app
npm uninstall -g create-react-app
npm cache clean --force
at the next
npm install -g create-react-app
Once installation successful, try running
npx create-react-app hello-world
Note
npx on the first line is not a typo — it’s a package runner tool that
comes with npm 5.2+.

npm ERR! Maximum call stack size exceeded - Trying to install webpack

I have been on this for the past 24hrs, I am trying to install webpack via npm with this command.
$ npm install webpack webpack-cli --save-dev
and it has been a total disaster, I have tried lot of things people said online but nothing works at all.
I have tried to downgrade and upgrade my node and npm version but right now i am using the latest version.
I have also tried to run the npm cache clear --force and still nothing great happened.
Please if you know any fix, let me know or if you know any other way. Thanks
There is a folder called .nmprc, I can not remember where it is located on windows but you should delete the folder and you are good to go!

Resources