Ionic@2.0.0-beta.7 install fails

npm install -g ionic@2.0.0-beta.7

npm ERR! Darwin 15.4.0
npm ERR! argv “/usr/local/Cellar/node/6.2.0/bin/node” “/usr/local/bin/npm” “install” "ionic@2.0.0-beta.7"
npm ERR! node v6.2.0
npm ERR! npm v3.9.0

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror at markDeps (/usr/local/lib/node_modules/npm/lib/install/deps.js:106:5)
npm ERR! typeerror at /usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:35
npm ERR! typeerror at Array.forEach (native)
npm ERR! typeerror at /usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:11
npm ERR! typeerror at Array.forEach (native)
npm ERR! typeerror at asyncMap (/usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:51:8)
npm ERR! typeerror at Array. (/usr/local/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
npm ERR! typeerror at LOOP (/usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
npm ERR! typeerror at chain (/usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:20:5)
npm ERR! typeerror at recalculateMetadata (/usr/local/lib/node_modules/npm/lib/install/deps.js:147:3)
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror

npm ERR! Please include the following file with any support request:
npm ERR! /Users/xxxxx/Documents/projects/i2/npm-debug.log

FYI. npm install -g ionic@beta succeeds

:thinking: why are you installing it like global?

npm install -g ionic@beta will install ionic-cli


npm install -g ionic@2.0.0-beta.7 are trying install ionic-angular on global. try remove ‘-g’.

Still learning how this all fits together, I apologize if I’m making fundamental mistakes.
This is probably moot. I got the impression that I had to install beta.7, but apparently that is not the case.

went through the following sequence

ionic start --v2 --ts --template sidemenu i3
cd i3
ionic start

demo runs as expected
The package.json dependencies have been updated to @angular/ which is what I was after.

Thank you for all your help. Great work at ionic!!

Hey, so just to explain why that happened: the ionic npm module is the CLI which contains all of the commands you run in a terminal such as ionic start or ionic serve and ionic help for a full list of them.

The ionic-angular npm module is the framework itself which contains the components and UI you use to make your app.

Some more information on the differences can be found here:

If you have an existing project using beta.6, the changelog has some steps for upgrading to beta.7:

Hope that helps!

@brandyshea Wow the recent beta.7 made a big breaking change for me, i was using the IonicApp.getComponent() method to get the navigation component from a service (Injectable), Now will i be able to do the same with @angular/core -> ViewChild from an Injectable? Seems not.

In general, trying to grab a dom element from a service class like that shouldn’t have been used anyways. Services should only be used to manipulate data, not touch the DOM.

1 Like

Ok i was using the service to cut down the boilerplate by allowing to pass a function a json with the properties like title, template, inputs and handlers, and that in change would just instantiate the alert, also keeping an eye for already opened alerts in order to avoid collision if opening one after another.

Does that mean i’m forced to either pass the nav component to the function itself or just import the alert component in each page and add a lot of boilerplate for each alert i instantiate?

1 Like

Got a fix, just using IonicApp.getActiveNav() method in my injectable should do the trick, i’m just calling an alert, i wouldn’t call that modifying the dom (not much), and since i need to call it from some services as well, this is the answer i was looking for.