I was getting error when i was installing npm but it seemed to me that it run fine. I created default app and i tried sudo npm run serve but i get this error
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/00/00/00/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/00/00/00/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
I tried:`npm cache clear` & `sudo npm cache clear` and i get error starting with As of npm#5, the npm cache self-heals from corruption issues.
NPM VERSION 8.18.0
Fixed it, i needed to add package.json file to my app.
Related
Current npm version: 8.19.2
Command npm publish --registry "https://some-private-registry.com" running from package home.
Produces the following error:
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\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! <somewhere>
I tried passing current folder as argument, i.e. npm publish "C:\path-to-folder" --registry "https://some-private-registry.com" running from package home, but with no success - the error stays the same. npm prefix correctly returns current folder.
For some reason - which I cannot understand - publish searches for package.json at disk root. Which is also important, npm unpublsh and npm install work without any issue.
Debug log also doesn't provide any sufficient information except above error.
Is there anything I might miss which could be causing the problem?
Thanks!
I am trying to include the GIT package https://github.com/Denglo/bs5-autocomplete-vanillaJS.git into my (simple) project. This currently only has two other packages:
"dependencies": {
"bootstrap": "latest",
"bootstrap-icons": "latest"
}
Running a npm install with the above works without an issue, but when I run any of the following
npm install git+https://github.com/Denglo/bs5-autocomplete-vanillaJS.git
or
npm install https://github.com/Denglo/bs5-autocomplete-vanillaJS.git
or
npm install github:Denglo/bs5-autocomplete-vanillaJS
I get the following error:
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path ~/.npm/_cacache/tmp/git-cloneHYQNgb/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '~/.npm/_cacache/tmp/git-cloneHYQNgb/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! ~/.npm/_logs/2022-07-22T09_37_33_747Z-debug-0.log
The ~/.npm/_cacache/tmp directory exists and the user has full access to it. The error log does not says the same as above. I also tried to manually add the line to the package.json, but that resulted in the same error.
Any ideas how I can solve this?
i am trying to install "npx create-react-app new" it successfully installs, however "npm start" shows error:
PS D:\react project\new> npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path D:\react project\new/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'D:\react project\new\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\user\AppData\Local\npm-cache\_logs\2022-03-15T08_51_51_601Z-debug.log
PS D:\react project\new>
I checked my package.json, it looks fine, anyone can suggest whats the issue here?
First of all run:
npm run start
if it did not work then delete the node-module folder and use
npm i or npm install
this will work for you.
I've removed and reinstalled NPM and Node, still no fix. Here's the error code after I create-react-app and input npm start.
npm ERR! syscall open
npm ERR! path /Users/carriepresley/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/carriepresley/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent```
Use cd to the directory where package.json is located and then run the npm start command. This will work.
I tried to install using the following code:
npm i apisauce --save
However, I got these errors:
npm WARN react-navigation-stack#2.8.2 requires a peer of
react-navigation#^4.1.1 but none is installed. You must install peer
dependencies yourself.
npm ERR! code ENOENT npm ERR! syscall rename npm ERR! path
F:\DoneWithIt\node_modules\follow-redirects\node_modules\debug npm
ERR! dest
F:\DoneWithIt\node_modules\follow-redirects\node_modules.debug.DELETE
npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file or
directory, rename
'F:\DoneWithIt\node_modules\follow-redirects\node_modules\debug' ->
'F:\DoneWithIt\node_modules\follow-redirects\node_modules.debug.DELETE'
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\Ravi\AppData\Roaming\npm-cache_logs\2020-08-01T13_33_29_249Z-debug.log
I was stuck on this same issue today and I think I fixed it just now. I followed the suggestions of uninstalling nodejs (and the node_modules folder if that doesn't also get automatically removed with it), making sure that your nodejs folder is in the environment variables path.
The stackoverflow thread I referenced is: Fixing npm path in Windows 8 and 10