Error installing Cordova using NodeJs on Windows 7 - node.js

Error installing Cordova using NodeJs on Windows 7
Please advice

Try to Run the command line as Administrator.

Your installation command is wrong!
It is
npm install -g cordova
not
npm -g install cordova
You must run cmd as administrator. If problem persist then install node and npm again.
or clean npm cache by npm cache clean command
NOTE : you must have an active internet connection!

Related

angular cli install command showing errors

npm install -g #angular/cli
I am trying to install angular cli on Windows 10, I have already installed npm and node, and have verified their version, they are above then what is required for angular cli to install but when I run install command on the prompt it show error.
i have uninstalled npm and node, then reinstalled them, and tried again to install and it worked :) thanks
first try to see node and npm is installed successfully using following commands on cmd
node -v
for node and it will return the version of node,then
npm -v
then it will return the version of npm after that in windows go to environment variables and see node environmental varible is there. after that
npm cache clean --force
use to clean the cache and go to users/Appdata/roaming and delete all the node modules in npm cache folder and restart your computer and give the following command.
npm install -g #angular/cli

"sudo npm install -g ionic" shows nothing

I'm trying to install ionic in my ubuntu laptop.
I have successfully installed Node.js and Cordova. They are working properly.
But when I try to install Ionic from sudo npm install -g ionic it doesn't give any output.
Then I wrote ionic in cmd, it says No command 'ionic' found,
Any idea about this is really appreciated.
cmd outputs
Your npm is not correctly installed. Try to uninstall it and install again.

Node sass Error while doing npm install

i was trying to do an npm install command, But ended up with an error related node sass.
I learning react/redux from the "https://github.com/buckyroberts/React-Redux-Boilerplate" from this. and doing npm install fails.
The error is attached as image.
I am using windows 7, with node 6.9. any idea to solve this error?
Step-1: open command prompt with administrator priviledges.
Step-2: type in the following command:
npm install --global --production windows-build-tools
This will install all the dependencies required.
Step-4: Now run the following command:
npm install node-sass
And you are good to go !
If you still face problems. Please refer to this page:
https://github.com/nodejs/node-gyp#on-windows
This is likely a package that depends on native build tools. Do you have Visual Studio installed? If not, try installing it first and reboot before retrying npm install.
Your issue may be related to https://github.com/sass/node-sass/issues/1379

Ionic Installation via npm

I am facing an error while installing cordova and ionic each and everytime. As I start my installation using npm install -g cordova ionic. The installation cursor keeps on rotating like for many minutes and then I have to explicitly terminate the installation. Please help me with this issue.
you can try
npm --loglevel info install -g cordova ionic
and it should tell you more about what is happening / where the installation process stalls.
try npm install -g cordova first followed by npm install -g ionic
also you may need to install other missing components if any, CLI will intimate you very nicely.
What the command:
npm install -g cordova
ionic does is tries to install the cordova and ionic in a sequential order and -g manages the environment variables as well.
So, i recommend you to first install cordova then ionic.
npm install -g cordova,
npm install -g ionic,
Furthermore, i prefer using gitbash CLI rather than the cli provided by default.
It handles the issues of bower installation which may appear afterwards.And if you want a complete guide from installing to building an android project you can try the steps of the blog from here.
Good Luck.
Using cache help me to face this issue with following command :
npm install -g cordova ionic --cache "c:\path\to\use\as\dependencies\cache"

phonegap - nothing happend on npm install -g phonegap

I've been trying to install phonegap with no luck.
I've already installed nodejs using:
sudo apt-get install node
But when I tried to run the following, nothing was outputted to the terminal. See attached image.
sudo npm install -g phonegap
Package name should be "nodejs" not "node".
Also make sure npm is installed by typing :
npm -v
in terminal.
Please read Installing Node.js via package manager for Node.js & NPM installation.

Resources