Installing Ionic - The term 'ionic' is not recognized - node.js

I am having trouble installing node.js and npm on my computer. I am running Windows 10 Pro x64, and using Windows Powershell (admin).
I am running node.js 9.10.1 and npm 5.8.0
Here's a screenshot of the error:
As you can see from the screenshot, I installed ionic cordova using the npm install -g ionic cordova command. (I don't know what the difference between that and npm install -g ionic is, though.)
I tried changing the windows PATH -thing, but I'm not sure if I did it correctly. (In the path-environment-variable I added a path to 'C:\Users\Peter\AppData\Local\npm' and one to 'Z:\Program\nodejs' where I installed node.js.)

Try using Roaming instead of Local. I think that installing with -g should go in Roaming.
C:\Users\Peter\AppData\Roaming\npm>

Related

Node wont update, despite downloading and installing latest versions

I am trying to create a new React app with create-react-app. However, when I ran npx create-react-app my-app I got an error:
npx: installed 67 in 8.408s You are running Node 12.22.0.
No worries, I went to the node.js site and downloaded and installed the latest version (18.1.0) and tried again, but got the same error.
Running node -v says I'm still using 12.22.-0.
So I tried npm install -g node --force. Install went fine, but again running node -v still says I'm using 12.22.0 and create-react-app wont work.
I am on Mac OS.
What can I do?
Node isn't installed via npm.
You need to either install Node via the official Mac OS installer, or via Brew (Recommended if you need more than one version)
https://nodejs.org/en/download/ - Download the Mac OS installer that suits your OS Version.

Npm isn't getting automatically installed on installing node.js

While hosting my webapp on heroku I got a message of some bugs in my npm package, my npm package was of version 3 and node.js was of version 8, I wrote thinking that I can update my npm version I tried to update it but the version remained same so I decided to uninstall it and wrote the command "npm uninstall " and than again tried to install npm but in vain ,finally I uninstalled my node.js and reinstalled tha npm will automatically get installed with it, but this too didn't work now I have node of version 10 with no npm which I got to know by checking version of npm which gave me message of "command not found ", now my every try to install npm has failed , may anyone suggest me what I can do to restore my losses and resume my work.
I am not sure if you have Linux or Windows. First I would check if the npm folder is in path.
You can follow one of these two to add to path if it is not done yet.
Windows
Linux
Alternatively you can install node with node version manager (nvm):
nvm linux and mac
nvm windows

Ionic start give error: There was an error with the spawned command: npminstall

I'm trying to create a mobile app with ionic and cordova but when I launch the comand
ionic start {{appname}} blank
after the download npm give me
Error with start undefined
Error Initializing app: There was an error with the spawned command: npminstall
There was an error with the spawned command: npminstall
I can see that the download is completed because I can see the generated folders. I followed all the suggest I found on the web like update node and npm but nothing works.
Here are the version of npm, node, cordova and ionic
ionic 2.2.1
cordova 6.5.0
npm 4.4.1
node 6.10.0
Other little warning:
I don't know why after all the upgrade when i launch
ionic -v
I've got this:
******************************************************
Dependency warning - for the CLI to run correctly,
it is highly recommended to install/upgrade the following:
Please install your Cordova CLI to version >=4.2.0 `npm install -g cordova`
******************************************************
2.2.1
even if the cordova version is > 4.2.0 but I really don't think that this is the primary problem. Any ideas?
EDIT:
I'm working on windows 7
I found the solution!
I tried to lunch the command
ionic start app blank --verbose
and as before it stopped at npminstall. The problem were that verbose doesn't told me the real problem.
I moved inside the folder downloaded by Ionic and I launch
npm install --verbose
and here he told me that the problem were the https proxy configuration.
So if the error gave by Ionic is just
There was an error with the spawned command: npminstall
just go inside the downloaded folder and launch
npm install --verbose
for check the real problem
Uninstall all (ionic, cordova, nodejs).
Install nodejs LTS version using this URL - https://nodejs.org/en/
Install ionic and cordova using this URL - https://ionicframework.com/docs/v2/intro/installation/
Also Reinstall Git and when it asks Adjusting your PATH environment select Use Git from the Windows Command Prompt.
When You install ionic and cordova open cmd as admin.
Then Run command in ionic start myApp blank --v2
I figured how to solve the dependency warning problem
cordova -v
and then you get a question like :
May Cordova anonymously report usage statistics to improve the tool over time?
say yes.then fixed warning problem.
then install npm globally
npm install -g npm
create a app without installing its packages
ionic start app --v2 --skip-npm
seems ok till now?then
cd app
install packages
npm install --save
done!try to start your ionic app
ionic serve

Error while installing ionic framework

I have looked at the other questions and answers but still my issue is not solved.
I have successfully installed node.js
Node version: 0.12.7
NPM version: 2.11.3
Now when I install Cordova, there are some warnings but it does get installed.
After that when I try to install ionic, it shows all errors and doesn't install.
I am on a Windows machine... so I am not using the 'sudo' in the command.
I haven't also tried to install the JDK, Apache Ant and Android SDK. Are they needed while installing?
Please let me know if you want screenshots.
Thank you
In windows system there is no need to write sudo,we can use npm install -g ionic to install ionic framework
Steps to work Ionic Framework
1)you have to install nodeJS
2)you have to install Java and configure it's path in environmental variables.
3)you have to install Apache-ant
4)you have to install Android-sdk and configure it's path in environmental variables
for reference please see these links Install Ionic Framework, Ionic frameowrk on windows7,8
For any queries reply
Try running command prompt as an administrator before running the commands, that always fixed it for me.

Warning installing ionic 2

I´m trying to install ionic 2 in my windows 10 64 bits.
My npm version is 3.10.9
When I tried to install with this line:
npm install -g --save ionic cordova
The CMD says:
A lot of people thinks I can still working, but, the fact is: not found command ionic, so I don´t know what to do.
I just had to restart the computer. Then the computer recognize the enviroment variable.

Resources