error to ionic in ubuntu 17.10.1 - linux

friends I have the following problem to install ionic
I already have correctly installed nodejs and npm
then install ionic with sudo npm install -g ionic
when I try to consult the installed version, I find the following error:
ionic –v
[ERROR] Unable to find command: –v
You may need to be in an Ionic project directory.
the strange thing is that I was able to install monaca and that works well, although monaca also uses ionic.
What I can do? Thanks

You are using a dash character (–) instead of the hyphen (-).
When I run your command (ionic –v) on Ubuntu 16.04 I get that same error, but then if I use the hyphen (ionic -v) I get the version out.

Related

Installing Ionic - The term 'ionic' is not recognized

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>

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

Cannot use ionic or cordova

i installed ionic on mu Ubuntu using this:
npm install -g cordova ionic
i know i was tested that via ionic command and it was working.
but now when i try to run it using ionic i see this :
No command 'ionic' found
i tried this but that wasnt my problem.
Cannot run ionic. receives "No command 'ionic' found"
sudo ln -s /home/guy/npm/bin/ionic /usr/bin/ionic
Try
sudo npm install -g ionic
then type the code
ionic -v to check the version of ionic.
If you are able to see the ionic version, your ionic is installed.

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