Not able to install apisauce in react-native project - react-native

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

Related

I am unable to install npm package

I have made an empty folder and trying to install the npm package inside the folder so I can start to write an application. I have been attempting to install package JSON with npm install -y but it only installs the package-lock-JSON but it's showing me the following error. I even reinstalled the node on my PC didn't work.
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\hasan\Desktop\Githubfiles\node _express_mongodb/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\hasan\Desktop\Githubfiles\node _express_mongodb\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\hasan\AppData\Local\npm-cache_logs\2022-12-06T12_18_28_964Z-debug-0.log
PS C:\Users\hasan\Desktop\Githubfiles\node _express_mongodb>

npm publish looks for package.json at disk root

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 get error when i run sudo npm run serve

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.

npm start isn't working in new React apps?

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.

npm install fail -- error message: enoent ENOENT: no such file or directory

i'm building an Vue.js project using vue init webpack project_name,after this step I ran npm install. and npm threw out errors below:
npm ERR! path /Users/duodian/Desktop/crop-demo/node_modules/js-
beautify/js/bin/css-beautify.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod
'/Users/duodian/Desktop/crop-demo/node_modules/js-beautify/js/bin/css-beautify.js'
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! /Users/duodian/.npm/_logs/2017-09-18T09_55_20_047Z-debug.log
node version 8.5.0
npm version 5.3.0
Note: I just updated my macOS HighSierra to 10.13 Beta, does this affect?
had any friends have this problem?
Running
npm install js-beautify#1.6.14
and then
npm install (assuming that you are installing deps in package.json)
worked for me. Got it from here.
https://github.com/beautify-web/js-beautify/issues/1247
It's bacause of js-beautify#1.7 i broken. So, try to downgrade vue-cli to 2.7.0 is a temporary workaround to solving this problem
npm install -g vue-cli#2.7.0