Ionic-cli: Unable to setup a project with version 2

Created on 13 Oct 2016  路  7Comments  路  Source: ionic-team/ionic-cli

Note: for support questions, please use one of these channels:

https://forum.ionicframework.com/
http://ionicworldwide.herokuapp.com/

Note: for build related issues you can open up an issue on the ionic-app-scripts repo

https://github.com/driftyco/ionic-app-scripts

Short description of the problem:

Error while executing

$ ionic start --v2

What behavior are you expecting?

Clean setup of the project

Steps to reproduce:
PS D:\SanoHub\Sanosense\Ionic> ionic start Testproject --v2
Creating Ionic app in folder D:\SanoHub\Sanosense\Ionic\Testproject based on tabs project
Downloading: https://github.com/driftyco/ionic2-app-base/archive/master.zip
[=============================] 100% 0.0s
Downloading: https://github.com/driftyco/ionic2-starter-tabs/archive/master.zip
[=============================] 100% 0.0s
Installing npm packages...
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
Caught exception:
undefined

Mind letting us know? https://github.com/driftyco/ionic-cli/issues

insert any relevant code between the above and below backticks

Post the output of ionic info below please

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

bug

Most helpful comment

@rogiervandenberg This might be because you are running with npm v2, which I believe we'd expect to fail. Can you try with npm 3, and let us know if it works?

All 7 comments

Getting exactly the same, using --skip-npm and running npm install manually helps.

Same issue here, my ionic info:

Cordova CLI: 6.3.1
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.0.0-beta.20
ios-deploy version: 1.9.0 
ios-sim version: 5.0.8 
OS: Mac OS X Yosemite
Node Version: v4.5.0
Xcode version: Xcode 7.2.1 Build version 7C1002 

using --skip-npm and running npm install manually doesnt work:

npm ERR! Darwin 14.5.0
npm ERR! argv "/Users/rogier/.nvm/versions/node/v4.5.0/bin/node" "/Users/rogier/.nvm/versions/node/v4.5.0/bin/npm" "install"
npm ERR! node v4.5.0
npm ERR! npm  v2.15.9
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package @angular/[email protected] does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer @angular/[email protected] wants @angular/[email protected]
npm ERR! peerinvalid Peer @angular/[email protected] wants @angular/[email protected]
npm ERR! peerinvalid Peer @angular/[email protected] wants @angular/[email protected]

Linking to https://github.com/driftyco/ionic-cli/issues/1445 as it is the same issue but that one is windows centric.

@rogiervandenberg This might be because you are running with npm v2, which I believe we'd expect to fail. Can you try with npm 3, and let us know if it works?

Upgraded my npm from 2 to 3 (3.10.8) and it works now!

Thank You. It works after upgrading npm to 2 (3.10.8)

Upgraded to 3.10.8

Was this page helpful?
0 / 5 - 0 ratings