Unable to install ionic on M1 mac mini (see terminal output below)
timothy#Timothys-Mac-mini ~ % sudo npm i -g #ionic/cli
Password:
Sorry, try again.
Password:
npm WARN deprecated formidable#1.2.6: Please upgrade to latest, formidable#v2 or formidable#v3! Check these notes:
npm WARN deprecated superagent#5.3.1: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at https://github.com/visionmedia/superagent/releases.
changed 218 packages, and audited 219 packages in 2s
26 packages are looking for funding
run npm fund for details
found 0 vulnerabilities
timothy#Timothys-Mac-mini ~ % ionic -v
zsh: command not found: ionic
timothy#Timothys-Mac-mini ~ %
Related
when i am installing ionic framework in MACBOOK Pro
find these are errors - zsh command not found:Ionic
i have tried many solution so how can we resolve.
pls resolve if any person know this solution
kishankumar#KISHANs-MBP ~ % ionic -v
zsh: command not found: ionic
kishankumar#KISHANs-MBP ~ %
To install Ionic, you will need to install NodeJS. Please install the LTS version of NodeJS, this can be downloaded from https://www.nodejs.org
After installing NodeJS, you will need to install Ionic from the command line.
To install Ionic, you will need to enter the following:
npm install -g #ionic/cli
You should be able to check the Ionic version after this is done.
I have a project with ionic 6 and capacitor, when I run ionic serve it work like a charm and I can see the project in my browser, but then when I run ionic capacitor build android I got this error:
error: unknown option '--npm-client'
[ERROR] An error occurred while running subprocess capacitor.
I have tried to use this solution, but it didn't work.
It says to:
npm uninstall -g ionic
npm uninstall -g #ionic/cli
npm install -g #ionic/cli
but I still get the same error. Someone already got the same error before?
Thanks!
npm uninstall -g ionic
npm install -g #ionic/cli#latest
Try this
I fix it updating to the last version with this, because the upgrade commands didn't work for me.
cd /tmp
wget https://registry.npmjs.org/#ionic/cli/-/cli-6.19.0.tgz
sudo npm -g install cli-6.19.0.tgz
I had the same issue and had to upgrade from node 14 to node 16.15 to make it work.
This issue is caused by older version of ionic-cli, you should upgrade the CLI version.
I am trying to install ionic and every time I try to install it says:
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
and I can't even check ionic -v to check version as it is not installed.
I can check npm version as it is installed correctly.
➜ ~ node -v
v8.7.0
➜ ~ npm -v
5.4.2
➜ ~ npm install -g cordova ionic
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
/Users/bilaltariq/.npm-packages/bin/cordova -> /Users/bilaltariq/.npm-packages/lib/node_modules/cordova/bin/cordova
/Users/bilaltariq/.npm-packages/bin/ionic -> /Users/bilaltariq/.npm-packages/lib/node_modules/ionic/bin/ionic
+ cordova#7.1.0
+ ionic#3.13.2
updated 2 packages in 27.258s
Had the same problem. The fix is to install ionic CLI globally:
As the developer user execute the following from your ionic project root directory:
npm uninstall ionic
then as user "root" execute the following:
npm i -g ionic#latest
after that, you should be able to use the new ionic CLI version 4.12.0
I am working on an Ionic 1 app with a remote team and lately our versions have not liked each other. I was wondering if the fact that I have also been working on Ionic 2 projects for whatever reason my CLI "thinks" these apps are also Ionic 2 and there for is shooting me the error below?
ionic build ios
WARN: ionic.project has been renamed to ionic.config.json, please rename it.
(node:9061) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Uh oh! Looks like you're missing a module in your gulpfile:
Cannot find module 'bower'
Do you need to run `npm install`?
I have ran npm install.. does not make it go away.. I also have make sure to have bower installed.
What does this hold up here have to do with? I've been stuck here for a couple days now.
UPDATE
I went to an old project that and i tried to run ionic info to see the versions I have and system info but I get THE SAME error message..
I have no idea what I've done to get this...
mymac ~/code/92_AAC/newApp on master[!]
$ ionic info
WARN: ionic.project has been renamed to ionic.config.json, please rename it.
Uh oh! Looks like you're missing a module in your gulpfile:
Cannot find module 'gulp'
Do you need to run `npm install`?
UPDATE 2
I downgraded from Node 6 to Node 5.9 On the current project I was having the original issues.. I got this..
$ ionic build ios
******************************************************
Dependency warning - for the CLI to run correctly,
it is highly recommended to install/upgrade the following:
Install ios-sim to deploy iOS applications. `npm install -g ios-sim` (may require sudo)
Install ios-deploy to deploy iOS applications to devices. `npm install -g ios-deploy` (may require sudo)
******************************************************
WARN: ionic.project has been renamed to ionic.config.json, please rename it.
(node:11866) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Uh oh! Looks like you're missing a module in your gulpfile:
Cannot find module 'bower'
Do you need to run `npm install`?
my ionic info(finally able to print it out)
Your system information:
Cordova CLI: 6.1.1
Gulp version: CLI version 1.2.1
Gulp local:
Ionic Version: 1.2.4
Ionic CLI Version: 1.7.14
Ionic App Lib Version: 0.7.0
ios-deploy version: 1.8.6
ios-sim version: 5.0.3
OS: Mac OS X El Capitan
Node Version: v5.9.1
Xcode version: Xcode 7.3.1 Build version 7D1014
UPDATE 3 after #janos suggestion
I ran npm install bower and it ran and installed some modules BUT I got the following..
click this link to see a screen shot of my command line in more detail
Screen Shot here!
```
$ ionic build ios
WARN: ionic.project has been renamed to ionic.config.json, please rename it.
(node:12122) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
There is an error in your gulpfile:
Error: ENOENT: no such file or directory, scandir '/Users/abelista/code/inov/cornerstone/inov/a4c/passengerApp/trunk/passenger/node_modules/gulp-sass/node_modules/node-sass/vendor'
at Error (native)
at Object.fs.readdirSync (fs.js:945:18)
at Object.getInstalledBinaries (/Users/abelista/code/inov/cornerstone/inov/a4c/passengerApp/trunk/passenger/node_modules/gulp-sass/node_modules/node-sass/lib/extensions.js:74:13)
at foundBinariesList (/Users/abelista/code/inov/cornerstone/inov/a4c/passengerApp/trunk/passenger/node_modules/gulp-sass/node_modules/node-sass/lib/errors.js:20:15)
at foundBinaries (/Users/abelista/code/inov/cornerstone/inov/a4c/passengerApp/trunk/passenger/node_modules/gulp-sass/node_modules/node-sass/lib/errors.js:15:5)
at Object.module.exports.missingBinary (/Users/abelista/code/inov/cornerstone/inov/a4c/passengerApp/trunk/passenger/node_modules/gulp-sass/node_modules/node-sass/lib/errors.js:45:5)
at Object. (/Users/abelista/code/inov/cornerstone/inoabelista
```
List item: The main error (A4CPassenger#1.1.1 - not sure what to call this.. but this was basically the name of the app? I believe the remote team changed it.. for whatever reason I am still getting the old name..)
I was running Node 6.0.0 and I needed to run Node 4.4.4
Under the above conditions can not be resolved, consider the ionic version, I encountered the same problem, because the final version ionic problem. ionic version upgrade quickly, do the project two months ago, and now ionic been upgraded from 1.7.16 to 2.0.0 of. if you Want to re-run this version, you should enter cmd 'npm install ionic#1.7.16', after the run is completed, then the implementation of 'ionic serve' you can run an older version of the project.
I hope to help you
I got the same situation.
I had updated ionic from npm (because it said it is outdated) and I didn't realize I have to update npm too. So I have to update npm e remove and reinstall ionic.
# Update npm (downloaded from nodejs.org +6)
sudo npm remove ionic
sudo npm install -g ionic
Run npm uninstall --save-dev gulp-sass#2
Installed Ionic successfully. When running ionic info and other commands like ionic browser --list, I get an error that cordova is lower then version 4.
Cordova is installed with no sudo and in global home directory.
> ionic info
Your system information:
Cordova CLI: 6.1.0 (cordova-lib#undefined)
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Version: 1.2.4
Ionic CLI Version: 1.7.14
Ionic App Lib Version: 0.7.0
OS: Distributor ID: Ubuntu Description: Ubuntu 15.10
Node Version: v5.9.1
******************************************************
Dependency warning - for the CLI to run correctly,
it is highly suggested to install/upgrade the following:
Please install your Cordova CLI to version >=4.2.0 `npm install -g cordova`
******************************************************
Cordova installation is at:
> which cordova
/home/user_1/.npm-global/bin/cordova
Ionic installation is at:
> which ionic
/home/user_1/.npm-global/bin/ionic
I am using cordova#6.2 and ionic#1.7 as well. After I got this error message, I opened a new terminal and typed cordova -v which outputted:
? May Cordova anonymously report usage statistics to improve the tool over time?
As soon as I entered my answer (No), the version number printed out and then I re-ran ionic info in my project terminal. The error was gone.
Caveats
I had just updated ionic#1.7.16 from 1.7.15. It's a very minor patch with one set of bug fixes that are not related to this.
The particular system that I had this problem with is running Windows 10.
The first time I ran ionic info in my project directory, I got the same error twice.
Original Error Output:
******************************************************
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`
******************************************************
Your system information:
You have been opted out of telemetry. To change this, run: cordova telemetry on.
6.2.0
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic CLI Version: 1.7.16
Ionic App Lib Version: 0.7.3
OS:
Node Version: v4.4.2
******************************************************
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`
******************************************************
I've tried a lot of different methods to resolve this, like reinstall with and without the --unsafe-perm=true --allow-root flags (which is how others advised to fix it on other questions/other places online) but it seems to be an issue with cordova at version 6.1.0 and ionic so for now use 6.0.0 by running
npm install -g cordova#6.0.0
That should do the trick as it is seems 6.1.0 isn't a stable version.
cordova telemetry off
Made the error disappear when running
ionic info
I chose to opt out of Telemetry which collects data during development for analytics. You can also opt in by using the "on" keyword instead.
Hat tip to Wayne Bloss for guiding me to this answer.
I had exactly the same result as Wayne Bloss on Windows 10. The error "> = 4.2.0" on the first attempt, and after checking the version "cordova -v", the error was gone (I answered Yes to the question on statistics).
As stated by Wayne Bloss this warning disappears when answering the question triggered by the command cordova -v. This worked also for my configuration using Cordova 6.3.1.
This works because the original reason for this is that the version information string for Cordova CLI not only contains the version number but also this piece of information "You have been opted out of telemetry. To change this, run: cordova telemetry on." which makes the internal evaluation of the string with semver return always false. Answering the telemetry question with "no" removed the string from the version thus making the warning message disappear.
I just ran into this so I found this page and seems like no proper answer so here is one.
Installing the cordova-cli deb package requires to:
Add the Ubuntu Cordova Personal Package Archive to your Ubuntu system
Install the cordova-cli package (and its dependencies)
So, for ubuntu
sudo apt-add-repository ppa:cordova-ubuntu/ppa
sudo apt-get update
sudo apt-get install cordova-cli
More info here
https://cordova.apache.org/docs/en/latest/guide/platforms/ubuntu/index.html
As others have noted, a possible cause of this is noise from cordova telemetry.
The issue is still present in cordova 6.5.0 and ionic 2.2.2.
As an additional piece of information, I would like to add that the following has to be run for the current user, e.g. if you have a CI system that installs cordova as root and then runs ionic as a non-privileged user, you will have to run
cordova telemetry off
again.
D:\>ionic start myapp blank
******************************************************
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`
******************************************************
Creating an Ionic app in D:\myapp based on the blank template.
Downloading: https://github.com/driftyco/ionic-app-base/archive/master.zip
Downloading: https://github.com/driftyco/ionic-starter- blank/archive/master.zip
Installing npm packages (may take a minute or two)...
/
? ♫ ? ♫ Your Ionic app is ready to go! ? ♫ ? ♫
The Ionic application is started without any issue of Cordova updating.
You can however, use the following code to update:
npm update -g cordova
It's well written in the caveat, You need to install cordova in your npm using npm install -g cordova
or
npm install -g cordova#4.2.0
Problem solved!