Atiq ur Rehman
Atiq ur Rehman

Reputation: 1

After creating app using npx create-react-app <myproject> , and start app by using "npm start" i got this error mentioned below

npm ERR! code ENOENT npm ERR! syscall open npm ERR! path E:\React js web\TextEdits/package.json npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file or directory, open 'E:\React js web\TextEdits\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\rehma\AppData\Local\npm-cache_logs\2022-09-20T19_31_34_823Z-debug-0.log

Upvotes: 0

Views: 544

Answers (2)

Alien MiiK
Alien MiiK

Reputation: 1

  1. sudo su 2.npm outdate -g check your npm latest version! npm i command isn't work use npm i npm -g

Upvotes: 0

Mason Clark
Mason Clark

Reputation: 221

If there is a package.json file in your directory, it most likely has something to do with the spaces in your directory/path. This causes some issues with npm/npx sometimes, and it's usually best to avoid them. Windows is the only major OS that allows spaces in their directories, and commands are usually built on the assumptions that the path won't include spaces. Since you're just starting a new project, I would recommend creating a whole new directory (such as E:/ReactProject/TextEdits) and trying to run the same commands there.

Upvotes: 2

Related Questions