0

when I want to run my project on react this error appears...how to solve it?

W:\Burgerapp>npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path W:\Burgerapp\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'W:\Burgerapp\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\Polymer\AppData\Roaming\npm-cache\_logs\2020-08-11T13_03_57_137Z-debug.log ```
hamid am
  • 29
  • 4
  • show the content of w:\Burgerapp – JeffRSon Aug 11 '20 at 13:17
  • it seems you are not in the correct folder to execute this command. – deepak Aug 11 '20 at 13:18
  • @JeffRSon which file? is json enough? bcuz problem comes from it – hamid am Aug 11 '20 at 13:19
  • `dir` should probably be enough ;-) Just read the error message... – JeffRSon Aug 11 '20 at 13:33
  • If there is indeed a file `package.json` then I'd assume your user "Polymer" is not allowed to open the file. This may be related to the type of drive W: - what is it? You might try to copy BurgerApp to the system hard drive below c:\Users\Polymer and try again from this folder. – JeffRSon Aug 11 '20 at 13:41
  • Unfortunately can not add picture...but a question: I have copied this json file from another directory...am I allowed to do that? if not how can I solve it by NPM? @JeffRSon – hamid am Aug 11 '20 at 13:43
  • the error message is not related to the content of package.json, but says it cannot find (or open) it – JeffRSon Aug 11 '20 at 13:47
  • I moved folder to windows' drive, didn't work but error changed to: ``` webpack is not a function npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! react-complete-guide@0.1.0 start: `node scripts/start.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the react-complete-guide@0.1.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Polymer\AppData\Roaming\npm-cache\_logs\2020-08-11T13_57_25_637Z-debug.log``` @JeffRSon – hamid am Aug 11 '20 at 14:00
  • Then you need to show scripts/start.js. Look here if it helps: https://stackoverflow.com/questions/55140033/failed-to-compile-webpack-is-not-a-function – JeffRSon Aug 11 '20 at 14:41

1 Answers1

0

It seems that you are writing "npm start" in the wrong place because there is no "package.json" file in the directory.

mscmnc
  • 393
  • 4
  • 7