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
Related
Downloading template
error Error: Command failed: npm install --save --save-exact react-native#latest
npm ERR! Windows_NT 10.0.18363
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\lenovo\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "--save" "--save-exact" "react-native#latest"
npm ERR! node v14.15.1
npm ERR! npm v4.0.0
npm ERR! cb.apply is not a function
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\lenovo\AppData\Local\Temp\rncli-init-template-O81d4q\npm-debug.log
It looks like you are using npm 4, updating npm to a version >= 6 should fix your issue (which should come by default with Node 12 and 14) according to this issue here.
You might also try this solution:
C:\Users(your username)\AppData\Roaming
Delete the npm folder and if there is one npm cache folder.
Run npm cache clean —force ( — force is now required to clean cache)
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
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!
I'm trying to start a new ionic project. I got this far and I'm very proud of that. Though I'm halted at ionic setup sass. I was able to 'ionic platform android'
I think the problem lies in the open 'C:\Users\ALIR\package.json'
It should be looking in : 'C:\Users\ALIR\Documents\Ionic\tutorials\test'
Also this line is concerning: '"C:\Program Files\nodejs\\node.exe" "C:\Program Files\nod
ejs\node_modules\npm\bin\npm-cli.js"'
All of these slashes sem inappropiate.
C:\Users\ALIR\Documents\Ionic\tutorials\test>ionic setup sass
npm ERR! install Couldn't read dependencies
npm ERR! package.json ENOENT, open 'C:\Users\ALIR\package.json'
npm ERR! package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm can't find a package.json file in your current directo
ry.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Users\ALIR\Documents\Ionic\tutorials\test
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! path C:\Users\ALIR\package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno 34
npm
Error running npm install
C:\Users\ALIR\Documents\Ionic\tut
orials\test>
So I had to create a package.json at Users\Alir. I just took the one from the todo folder. I'm sure this is not good, but what else can I do.
Now everything is progressing.
Im trying to install phonegap using the cmd
"npm install -g phonegap"
but its not installing and giving me installation failed message ive pasted the cmd message below
so how do i set the proxy settings(assuming thats the issue) which nodejs can use to connect to the internet and complete the installation of phonegap
my system config is windows 7 64bit
C:\Windows\system32>npm install -g phonegap
npm http GET https://registry.npmjs.org/phonegap
npm ERR! Error: connect ECONNREFUSED
npm ERR! at errnoException (net.js:901:11)
npm ERR! at Object.afterConnect [as oncomplete] (net.js:892:19)
npm ERR! { [Error: connect ECONNREFUSED]
npm ERR! code: 'ECONNREFUSED',
npm ERR! errno: 'ECONNREFUSED',
npm ERR! syscall: 'connect' }
npm ERR!
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly. See: 'npm help config'
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files\nodejs\\node.exe" "C:\Program
Files\nod
ejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "phonegap"
npm ERR! cwd C:\Windows\system32
npm ERR! node -v v0.10.21
npm ERR! npm -v 1.3.11
npm ERR! syscall connect
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! stack Error: connect ECONNREFUSED
npm ERR! stack at errnoException (net.js:901:11)
npm ERR! stack at Object.afterConnect [as oncomplete]
(net.js:892:19)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Windows\system32\npm-debug.log
npm ERR! not ok code 0
Solved it
Just had to set
npm config set proxy http://usr:pwd#proxyname:port
npm config set https-proxy http://usr:pwd#proxyname:port
npm config set registry http://registry.npmjs.org/