Unable to install Cordova Ionic using npm - android

I am trying to install cordova ionic using npm in cmd and with the command npm install -g cordova ionic
I am getting following errors:
Screenshot of problem
C:\Users\Asus>npm install -g cordova ionic
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova" "ionic"
npm ERR! node v7.4.0
npm ERR! npm v4.0.5
npm ERR! Cannot read property 'path' of null
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\Asus\npm-debug.log
Note: I have pre installed android sdk,winant,git,nodejs.
What should I do?

Run cmd as an administrator then run the command

Related

Cannot install Apache Cordova using "npm install -g cordova"

all. I've been trying to install Apache Cordova on my Windows 10 PC, and I've been getting this issue over and over. I've been following these three guides to install Cordova:
cordova.apache.org/docs/en/latest/guide/platforms/android/index.html
evothings.com/doc/build/cordova-install-windows.html
www.tutorialspoint.com/cordova/cordova_environment_setup.htm
I checked on the command line and Git, Android Studio and the JDK have all been installed successfully like the tutorials asked for and I took a look at some similar posts here on SO where the answer was to use "sudo npm install -g cordova" as well as this post and no luck.
And here's the error I've been getting :
npm WARN retry will retry, error on last attempt: Error: EBUSY: resource busy or locked, rename 'C:\Users\Ray\AppData\Local\Temp\npm-7756-015c0ec3 \registry.npmjs.org\path-parse\-\path-parse-1.0.5.tgz.2712739132' -> 'C:\Users\Ray\AppData\Local\Temp\npm-7756-015c0ec3\registry.npmjs.org\path-parse\-\path-parse-1.0.5.tgz'
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! tarball.destroy 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 WARN retry will retry, error on last attempt: Error: EBUSY: resource busy or locked, rename 'C:\Users\Ray\AppData\Local\Temp\npm-7756-015c0ec3\registry.npmjs.org\tty-browserify\-\tty-browserify-0.0.0.tgz.1810143622' -> 'C:\Users\Ray\AppData\Local\Temp\npm-7756-015c0ec3\registry.npmjs.org\tty-browserify\-\tty-browserify-0.0.0.tgz'
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! tarball.destroy 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 WARN retry will retry, error on last attempt: Error: EBUSY: resource busy or locked, rename 'C:\Users\Ray\AppData\Local\Temp\npm-7756-015c0ec3\registry.npmjs.org\tty-browserify\-\tty-browserify-0.0.0.tgz.709475096' -> 'C:\Users\Ray\AppData\Local\Temp\npm-7756-015c0ec3\registry.npmjs.org\tty-browserify\-\tty-browserify-0.0.0.tgz'
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! tarball.destroy 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>
I believe some anti-virus software running in the system could be causing this issue. Try stopping the anti-virus program and install cordova.
An other probable fix for this issue could be to install latest version of nodejs.

React Native Could Not Install

I am attempting to run the React Native sample on Android, located: https://github.com/brentvatne/react-native-scrollable-tab-view
Following the steps:
cd ...\react-native-scrollable-tab-view-master\examples\FacebookTabsExample
npm install ---fails
The error on this step is:
C:\Users\KJA\ReactNativeProjects\FacebookTabsExample>npm install
npm ERR! addLocal Could not install C:\Users\KJA
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v5.7.0
npm ERR! npm v3.6.0
npm ERR! code EISDIR
npm ERR! errno -4068
npm ERR! syscall read
npm ERR! eisdir EISDIR: illegal operation on a directory, read
npm ERR! eisdir This is most likely not a problem with npm itself
npm ERR! eisdir and is related to npm not being able to find a package.json in
npm ERR! eisdir a package you are trying to install.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\KJA\ReactNativeProjects\FacebookTabsExample\npm-debug.log
I cannot locate why this is the case? How can this be alleviated?
Make sure you have installed the following modules globally first before trying to use this module
react
npm install react -g
react-native
npm install react-native -g
Then try and run the command again.

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

Issue while ionic installation

I am using the following command for installing cordova and ionic :
npm install -g cordova ionic
After running the command, i am getting the following error :
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\node
js\\node_modules\\npm\\bin\\npm-cli.js" "install" "npm" "-g"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package generator-karma does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer generator-angular#0.12.1 wants generator-karma#>=0.9.0
npm ERR! peerinvalid Peer generator-angular-ui-router#0.5.3 wants generator-karma#~0.5.0
npm ERR! Please include the following file with any support request:
npm ERR! D:\iconic_start\npm-debug.log
I am having npm and node installed.
Probably some packages are outdated.
Try to run:
npm update -g
That will update everything, install missing packages, etc. Or as per the docs:
npm update -g will apply the update action to each globally- installed
package that is outdated -- that is, has a version that is different
from latest.
That should fix your problem.
More info on the update command here.
If not, simply try to reinstall your node.js.

Why can't NPM read my dependencies?

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.

Categories

Resources