Having trouble opening a react file that was already created in the browser

So last night I started a React project to begin learning react.

I used create react app which allowed me to have a “live server” to run in the browser so I could see my code. I saved and closed my browsers/VS code last night and today I opened everything back up and can no longer open the “live server” to see my code.
from what I understand I have to open the terminal in vs code and type “npm start”.

however, when I type npm start I get these errors. I’m new to react and don’t really understand what this even means.

npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users****\OneDrive\Documents\React Testing\Testing/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open ‘C:\Users\trent\OneDrive\Documents\React Testing\Testing\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*\AppData\Local\npm-cache_logs\2022-11-21T03_22_02_198Z-debug-0.log
PS C:\Users*
\OneDrive\Documents\React Testing\Testing>

So, it looks like it can’t find a file. “ENOENT” means that it can’t find a file. This is not a React problem but is with Node or npm.

Are you in the right folder?

npm ERR! path C:\Users****\OneDrive\Documents\React Testing\Testing/package.json

Did you build this on your OneDrive cloud? I might build it in a “normal” folder just to make sure that that isn’t messing things up. Are you logged in to OneDrive?

It says that it can’t find the “package.json” file in the folder. Can you run:

ls C:\Users\trent\OneDrive\Documents\React Testing\Testing\package.json

to confirm that it is there?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.