Can't install plugin NPM - android

I have a cordova ionic application. I'm trying to install a plugin. I'm not able to. The error I have happens on any plugins I try to install really. It happens when I also try to delete a platform for example or run the application on Android. It just happens all the time. I can't figure out how to fix it. I've tried cleaning the cache, moving the cache location, running everything as administrator, giving full permission to my folder and all its children. I'm using Windows 10 as an administrator.
PS C:\Users\mario\Desktop\scmobileapppublic> cordova plugin add cordova-plugin-file-transfer
Error: Failed to fetch plugin cordova-plugin-file-transfer via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 4294963248 Error output:
npm ERR! path C:\Users\mario\Desktop\scmobileapppublic\node_modules\fsevents\node_modules\aws4\package.json
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\mario\Desktop\scmobileapppublic\node_modules\fsevents\node_modules\aws4\package.json'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, unlink 'C:\Users\mario\Desktop\scmobileapppublic\node_modules\fsevents\node_modules\aws4\package.json'
npm ERR! at Error (native)
npm ERR! stack: 'Error: EPERM: operation not permitted, unlink \'C:\\Users\\mario\\Desktop\\scmobileapppublic\\node_modules\\fsevents\\node_modules\\aws4\\package.json\'\n at Error (native)',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'C:\\Users\\mario\\Desktop\\scmobileapppublic\\node_modules\\fsevents\\node_modules\\aws4\\package.json' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\mario\AppData\Roaming\npm-cache\_logs\2017-08-31T21_18_02_104Z-debug.log
Any help would be appreciated! Thank you

Do not know why, but those steps worked for me :
-> remove node_modules folder inside AppData/roaming/npm
-> open terminal as admin and do following cmd :
npm cache clean --force
Be in mind that will delete all your packages installed globally, Ionic and Cordova in our case.
So you'll need to reinstall them.

Related

I don't know why this is happened and i don't know how to ask this question

I'm using termux app, then i try to install npm packages in the different directory in my phone.
The first one "/storage/shared/coding"
.../0/Coding $ npm i node-session
npm WARN deprecated nomnom#1.8.1: Package no longer supported. Contact support#npmjs.com for more info.
npm WARN deprecated #mapbox/geojsonhint#2.0.1: Please make plans to check GeoJSON in some other way
npm ERR! code EPERM
npm ERR! syscall symlink
npm ERR! path ../#mapbox/geojsonhint/bin/geojsonhint
npm ERR! dest /storage/emulated/0/Coding/node_modules/.bin/geojsonhint
npm ERR! errno -1
npm ERR! Error: EPERM: operation not permitted, symlink '../#mapbox/geojsonhint/bin/geojsonhint' -> '/storage/emulated/0/Coding/node_modules/.bin/geojsonhint'
npm ERR! [Error: EPERM: operation not permitted, symlink '../#mapbox/geojsonhint/bin/geojsonhint' -> '/storage/emulated/0/Coding/node_modules/.bin/geojsonhint'] {
npm ERR! errno: -1,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'symlink',
npm ERR! path: '../#mapbox/geojsonhint/bin/geojsonhint',
npm ERR! dest: '/storage/emulated/0/Coding/node_modules/.bin/geojsonhint'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /data/data/com.termux/files/home/.npm/_logs/2022-04-25T19_14_38_772Z-debug-0.log
.../0/Coding $ pwd
/storage/emulated/0/Coding
And the second one "/noda"
~/noda $ npm i node-session
npm WARN deprecated nomnom#1.8.1: Package no longer supported. Contact support#npmjs.com for more info.
npm WARN deprecated #mapbox/geojsonhint#2.0.1: Please make plans to check GeoJSON in some other way
added 151 packages, and audited 152 packages in 7s
43 packages are looking for funding
run `npm fund` for details
17 vulnerabilities (1 moderate, 12 high, 4 critical)
To address issues that do not require attention, run:
npm audit fix
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
~/noda $ pwd
/data/data/com.termux/files/home/noda
Why does node-session can be installed in /noda directory but not in /storage/shared/coding and how can i install it in /storage/shared/coding
NodeJs you installed on Termux doesn't have permission to install dependencies on /storage/emulated/0/Coding/node_modules/.bin/geojsonhint.
You can solve it by:
Changing the directory of the project to somewhere with public permissession.
Running the command with the administration privilege but on Termux, I think.
Using nvm to install node js instead of default ways.
This problem comes when you try to install node js with Termux. try not to.
NVM repository link: nvm-sh/nvm.
pay attention:
You need to check your dependency tree is compatible with the node version you want to install.
If the project is big be careful because you can break your project easily.

i trying to add android platform in ionic but its not working , it showing errors

I'm trying to add android platform in ionic but its not working , it showing the following errors:
C:\Users\Lenovo\Desktop\first app\RoomBooking>cordova platform add android
Using cordova-fetch for cordova-android#~6.3.0
Error: Failed to fetch platform cordova-android#~6.3.0
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: cmd: Command failed with exit code 4294963248 Error output:
npm ERR! path C:\Users\Lenovo\Desktop\first app\RoomBooking\node_modules\.stagin
g
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\Lenovo\Desktop\
first app\RoomBooking\node_modules\.staging'
npm ERR! { Error: EPERM: operation not permitted, unlink 'C:\Users\Lenovo\Deskt
op\first app\RoomBooking\node_modules\.staging'
npm ERR! stack: 'Error: EPERM: operation not permitted, unlink \'C:\\Users\\Le
novo\\Desktop\\first app\\RoomBooking\\node_modules\\.staging\'',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'C:\\Users\\Lenovo\\Desktop\\first app\\RoomBooking\\node_modul
es\\.staging' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Lenovo\AppData\Roaming\npm-cache\_logs\2017-11-26T21_56_46
_792Z-debug.log
what should i do?
It's probably an issue with npm. Try downgrading npm, run the following command:
npm install -g npm#5.3

npm installation with firebase functions

i faced this error while i trying to install npm using cmd on windows 10
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc#1.6.6 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc#1.6.6 install 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\MANA\AppData\Roaming\npm-cache\_logs\2017-11-21T07_27_36_499Z-debug.log
NPM install failed, continuing with Firebase initialization...
i Writing configuration info to firebase.json...
i Writing project information to .firebaserc...
+ Firebase initialization complete!

Unable to start react native app

Guys I am Stuck here I have downgrade both my node and npm in order to run the application
currently my node version is 8.4.0 and npm is 4.6.1
Steps I did are
create-react-native-app SampleApp
cd SampleApp
npm run ios
And the result app is not working
Purushothams-MacBook-Pro:SampleApp Purushotham$ npm run ios
SampleApp#0.1.0 ios /Users/Purushotham/Desktop/Demo/SampleApp
react-native-scripts ios
21:59:37: Starting packager...
21:59:39: Error starting packager: Error: EACCES: permission denied, open '/Users/Purushotham/Desktop/Demo/SampleApp/.expo/packager-info.json'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! SampleApp#0.1.0 ios: react-native-scripts ios
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the SampleApp#0.1.0 ios 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! /Users/Purushotham/.npm/_logs/2017-11-12T16_29_39_085Z-debug.log
After executing sudo chmod -R 777 ~/.expo/ and installing expo.io application in my macbook it gets stuck like thi. you can see the below picture

Getting Error npm ERR! errno 50 while installing Ionic

Hello I tried making Ionic App using node.js
first time I successfully made the simple Hello World Project in ionic
Next day because of the some reason i have to re-install the node.js
now when i am trying to make ionic app It's giving me an error
Your environment has been set up for using Node.js 0.10.32 (ia32) and npm.
C:\Users\SABA-PC>npm install -g ionic gulp
npm ERR! Error: EPERM, unlink 'C:\Users\SABA-PC\AppData\Roaming\npm\node_modules
\ionic\node_modules\.bin'
npm ERR! { [Error: EPERM, unlink 'C:\Users\SABA-PC\AppData\Roaming\npm\node_mod
ules\ionic\node_modules\.bin']
npm ERR! errno: 50,
npm ERR! code: 'EPERM',
npm ERR! path: 'C:\\Users\\SABA-PC\\AppData\\Roaming\\npm\\node_modules\\ionic
\\node_modules\\.bin' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic" "gulp"
npm ERR! cwd C:\Users\SABA-PC
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! path C:\Users\SABA-PC\AppData\Roaming\npm\node_modules\ionic\node_modul
es\.bin
npm ERR! code EPERM
npm ERR! errno 50
npm ERR! stack Error: EPERM, unlink 'C:\Users\SABA-PC\AppData\Roaming\npm\node_m
odules\ionic\node_modules\.bin'
npm ERR! error rolling back Error: EPERM, unlink 'C:\Users\SABA-PC\AppData\Roami
ng\npm\node_modules\ionic\node_modules\.bin'
npm ERR! error rolling back { [Error: EPERM, unlink 'C:\Users\SABA-PC\AppData\R
oaming\npm\node_modules\ionic\node_modules\.bin']
npm ERR! error rolling back errno: 50,
npm ERR! error rolling back code: 'EPERM',
npm ERR! error rolling back path: 'C:\\Users\\SABA-PC\\AppData\\Roaming\\npm\\
node_modules\\ionic\\node_modules\\.bin' }
npm ERR! not ok code 0
In my Environment Variable Path=C:\Users\SABA-PC\AppData\Roaming\npm
i tried location the folder C:\\Users\\SABA-PC\\AppData\\Roaming\\npm\\
node_modules\\ionic\\node_modules\\.bin
which is saying Access is denied eventhough i am running node.js as a administrator
Please help
There might be a problem with your node or npm as you've said you had to reinstall it. Try to change the location of your npm cache by running this command:
npm config set cache C:\Users\SABA-PC\AppData\Roaming\nodejs\npm-cache --global
And read more about npm updates here:
https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows

Categories

Resources