Reputation: 1
I've built a react app in VsCode and after a while wanted to put it in a subfolder of the folder it's currently in, but after I've put it inside the subfolder everytime I've tried to run it I get an error 'Could not read package.json: Error: ENOENT: no such file or directory', how can I fix it?
Upvotes: 0
Views: 20
Reputation: 21
Check that all configurations point correctly to the new paths. Check these:
package.json
file is present in the new subdirectory;npm install
;.env
, webpack.config.js
, tsconfig.json
and make sure the paths are updated according to the new folder structure;package.json
file do not contain absolute or relative paths that still point to the old folder;npm cache clean --force
.Upvotes: 0