'On npm start npm ERR! A complete log of this run can be found in:
On npm start I am getting
npm ERR! A complete log of this run can be found in:C:\Users\asus\AppData\Roaming\npm-cache_logs\2019-07-05T11_54_44001Z-debug.log
How can I solve this, please help me out
Solution 1:[1]
Type this command and your problem will be solved.
npm set registry http://registry.npmjs.org/
Solution 2:[2]
You should be in the right folder before you start react. Your main folder which includes public,src, package.json files should be targeted with changing directory and then npm start can be used
Solution 3:[3]
I was facing the same problem. And this is how I solved it.
Little scenario here.
I downloaded the other's project from GitHub ; did not started from the scratch. I extracted the zip. It created the folder react-stop-watcher with another folder react-stop-watcher.
Initially I hit the npm start command in
C:\Users\Lenovo\Downloads\react-stopwatch-master\
It throw the same npm ERR!. We need to get into
C:\Users\Lenovo\Downloads\react-stopwatch-master\react-stopwatch-master\
instead And then hit
- npm install
- npm start
And now my project is up and running.
Solution 4:[4]
I faced the same problem. So, first I uninstalled the previous version by using
npm uninstall -g create-react-app
to ensure npx always uses the latest version.
And then reinstalled with the same code procedure:
npx create-react-app my-app
cd my-app
npm start
And it worked!
Solution 5:[5]
Most probably I think you are using mysql but you not install mysql or not import the mysql.
I am also getting the same error but i resolve it by installing and importing the mysql.
try this
npm install mysql
import mysql in the file
var mysql = require('mysql');
Solution 6:[6]
change the parent name u have give space between them like
"hello world"
"hello_world" folder name should be this.
Solution 7:[7]
- first delete the file (project).
- then rm -rf \Users\asus\AppData\Roaming\npm-cache_logs\2019-07-05T11_54_44001Z-debug.log (this is the file which is showing error).
- recreate your project for example :- npx create-react-app hello_world
- then cd hello_world.
- then npm start.
I was also having this same error but hopefully after spending 1 day on this error i have got this solution and it got started perfectly and i also hope this works for you guys also...
Solution 8:[8]
Basically, the error is just because of a network issue, might be your internet connection off or low internet connection try after some time that definitely works.
# to create project
npx create-react-app projectName
# to run server
npm start
Solution 9:[9]
Just follow this code
npm install
Then
npm audit fix
Solution 10:[10]
Add SKIP_PREFLIGHT_CHECK=true to a .env file and that's it. Will solve it if you are using react
Solution 11:[11]
cd to your project directory(myapp) where you have node_modules, public, src etc and try npm run.
Solution 12:[12]
An error is coming coz you are not in the correct directory. Simply use cd(react project name) i.e.in may case its cd my-app(that I created using npm create-react-app my-app) and then simply run npm start
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
