Reputation: 21
D:\react> npm start npm ERR! code ENOENT npm ERR! syscall open npm ERR! path D:\react/package.json npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file or directory, open 'D:\react\package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Dell\AppData\Local\npm-cache_logs\2023-02-04T06_09_25_519Z-debug.log
I am a beginner , I have my node installed in C: drive but I Want to create a react project in D: drive . project was created but when I ran 'npm start' it gave me Error. npm ERR! This is related to npm not being able to find a file.
Upvotes: 2
Views: 670
Reputation: 21
Opened command prompt as an administrator and and changed my directories to d drive and reached to my folder . then created project and ran " npm start " from command prompt .it worked . so just I had to open project as an administrator.
follow below steps :
C:\Windows\system32>cd..
C:\Windows>cd..
C:\>d:
D:\>cd react
D:\react>npx create-react-app my-app
your project will be created. then go to project folder
D:\react>cd my-app
D:\react\my-app>npm start
// plz don't type above quotation mark.
now my project ran into the browser. I Hope it helps to others as well.
Upvotes: 0