-1
 npm start
 npm ERR! path C:\WINDOWS\System32\WindowsPowerShell\v1.0\package.json
 npm ERR! code ENOENT
 npm ERR! errno -4058
 npm ERR! syscall open
 npm ERR! enoent ENOENT: no such file or directory, open 'C:\WINDOWS\System32\WindowsPowerShell\v1.0\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\ATUL\AppData\Roaming\npm-cache\_logs\2017-10-01T10_20_21_068Z-debug.log

I am following the Wes-bos tutorial of learn-node. When I do npm start, it gives me these errors. Please help me. I have referred to all the previous questions. I am not able to find anything.

sugandh_g
  • 357
  • 2
  • 7
  • 16

3 Answers3

2

You have to run npm start in the root of the project you want to run, it seems you are runing npm start in a folder where there is not a package.json file.

The error says that you are running npm start in this path C:\WINDOWS\System32\WindowsPowerShell\v1.0\package.json but it seems that inside that folder you don't have a package.json file, so maybe you are in a wrong folder location.

So, if you downloaded some code to get started with, you should move to the root of that code and then run npm start. If you are starting a new app, you have to run npm init first, that command will create a package.json file in the same location where you are in the console and then you will be able to run npm start.

  • I just had the same problem above and tried many ways but couldn't work. But your answer reminded me that I need to make sure to run in the right folder and just solved my problem. Thanks. – Kenny Jul 14 '23 at 11:03
0

I just had the same problem, so far I have never seen it.

But my solution was:

  1. Rename the project folder (remove [], (), {} and special characters). Also try to remove spaces between words and if you continue the error try to join or just use (- or _) instead of space

  2. Keep an eye on which folder is being performed. "When I didn't run: npm init -y" he would throw me to (C: \ WINDOWS \ System32 \ WindowsPowerShell \ v1.0 \ package.json), you don't want to run here, use your project folder, change in the terminal to your folder: cd './c:\user\...\project'

Note: Solution tested in Windows - Visual Studio Code v1.56.0

0

Its 2023 and if ENONET error is coming than just go to the package.json file and go to the script section of it. Above the script section there is an option of Debug with a play button, just click on it and see the magic...

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 13 '23 at 05:17