-2

Everytime when i try to run npm start command this error comes, i tried to clear the npm cache still no luck, i am new to react js please help

C:\Users\Staff Member\Desktop\React\react>npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\Staff Member\Desktop\React\react\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\Staff Member\Desktop\React\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\Staff Member\AppData\Roaming\npm-cache\_logs\2020-09-02T03_34_33_868Z-debug.log

C:\Users\Staff Member\Desktop\React\react>
Christian Fritz
  • 20,641
  • 3
  • 42
  • 71
Lost Kid
  • 1
  • 2
  • does `C:\Users\Staff Member\Desktop\React\react\package.json` exist? I assume not, because that's what the error is telling you. Your question has no context. What are you trying to do? Why do you expect there to be a start script? Are you creating a package or did you download an existing one? – Christian Fritz Sep 02 '20 at 03:46

1 Answers1

0

Open your CLI, and in the root folder of your directory run

npm init --yes

This will automatically create a package.json and insert default values that are taken from your current project