I\'m trying to learn react, so I have this sample code for the full-stack react voting app, and I am trying to get it to work but after running npm install followed by npm s
I am using react-create-app
in Windows 10, on February 2nd, 2019 with latest NodeJS 11.9.0 and npm 6.7.0 (When you install NodeJS, the npm
is existing). I think case of node packages are corrupted is rarely, the main cause permission.
At the beginning, I put project directory at Desktop, it is belong to C:\
driver. I move to another directory of another driver. Therefore, I remove "file permission" concern. Every work well and simple.
cd /d D:\
mkdir temp20190202
npx create-react-app my-app
cd my-app
npm start
It is ok, not put project folder in a directory of C:\
(or other driver what contains Windows Operating system).
i tried to solve this problem with this way
rm -rf node_modules && rm ./package-lock.json && npm install
But for me its not work.
I just restart my machine and its working perfectly.
Am Linux user ,Machine HP.
I was issuing the npm start command with the folder of the project opened at Sublime Text. Closing ST and restarting the server did the work for me.
first i ran:
npm run clean
(even though it came with errors)
Then i deleted the node_modules folder and ran
npm install
This seems to have solved the problem.
Resolved like this:
# chown -R <user>: node_modules
In my case, I had checked out a different branch with a new library on it. I fixed my issue by only running npm install
without doing anything else. I was confused why I was getting ELIFECYCLE
error when the port was not being used, but it must have been because I did not have the library installed. So, you might not have to delete node_modules
to fix the issue.