Reputation: 1
Whenever I am running npm start in my project it displays the following error
npm ERR! code ENOENT npm ERR! syscall open npm ERR! path /home/abhi/package.json npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, open '/home/abhi/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!
/home/abhi/.npm/_logs/2020-12-17T04_15_31_411Z-debug.log
abhi@Abhi:~/Projects/demo1$
I tried everything to fix the issue but did not find a solution. what I am missing in JSON.package ??
Upvotes: 0
Views: 15328
Reputation: 1
ws PowerShell Copyright (C) 2015 Microsoft Corporation. All rights reserved.
PS C:\Notepad> npm start npm ERR! code ENOENT npm ERR! syscall open npm ERR! path C:\Notepad\package.json npm ERR! errno -4058 npm ERR! enoent Could not read package.json: Error: ENOENT: no such file or directory, open 'C:\Notepad\package.json' npm i get this problem
Upvotes: 0
Reputation: 1
check npm is downloaded or not - npm -v if yes just update npm once-npm install -g npm and then try again.
thanx.
Upvotes: 0
Reputation: 1
You should make npm install in the app directory so type cd your path in the terminal and make sure your in the directory of the app.
Upvotes: 0
Reputation: 1
If you are using Visual Studio code, go to the app directory and right click the folder and select "open with Visual Studio Code", then run in terminal npm start
and it should work.
If "open with Visual Studio Code" doesn't show, you need to reinstall it and during the reinstallation there will be 4 checkboxes, check them and install.
Upvotes: 0
Reputation: 1
I have also got the same error. I renamed the folder, and it worked.
Upvotes: 0
Reputation: 21
You need to navigate to your app directory to be able to run npm start. seems you are running it out of that directory. type cd "your app path" then npm start
Upvotes: 2
Reputation: 68
is your package initialised at all? did you run
npm init
or your dependencies and their versions are correct? and the node version too?
Clear everything from the cache and try installing again
npm cache clean
Upvotes: 0