Ionic2 beta won't install on OSX


#1

I have an ionic@2.0.0-beta.31 app that works perfectly on a Windows/Android environment. As soon as I try build it on an OSX environment, I get errors.

I have tried upgrading my Ionic app to a later version of Ionic (i.e. post rc0), but I found that has just opened up a can of worms. I am using Meteor, Typings, etc, and after spending many days trying to upgrade, have decided to remain on ionic@2.0.0-beta.31.

Question

My issue is how do I get ionic@2.0.0-beta.31 to work on OSX building an ios platform?

Install OSX

I do a clean install of OSX on VMWare.

Install Node:

I install node-v6.9.2

npm -v

3.10.9

Install Ionic:

npm install -g ionic@2.0.0-beta.31

The install takes a very long time, and results in errors. (I have tested the Internet Speed on OSX, and it’s around 10Mbps. When I install Ionic with the same connection speed on Windows, it is a lot faster.)

Errors

enter image description here

npm-debug.log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'install',
1 verbose cli   '-g',
1 verbose cli   'ionic@2.0.0-beta.31' ]
2 info using npm@3.10.9
3 info using node@v6.9.2
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData ionic@2.0.0-beta.31
8 silly fetchNamedPackageData ionic
9 silly mapToRegistry name ionic
10 silly mapToRegistry using default registry
11 silly mapToRegistry registry https://registry.npmjs.org/
12 silly mapToRegistry data Result {
12 silly mapToRegistry   raw: 'ionic',
12 silly mapToRegistry   scope: null,
12 silly mapToRegistry   escapedName: 'ionic',
12 silly mapToRegistry   name: 'ionic',
12 silly mapToRegistry   rawSpec: '',
12 silly mapToRegistry   spec: 'latest',
12 silly mapToRegistry   type: 'tag' }
13 silly mapToRegistry uri https://registry.npmjs.org/ionic
14 verbose request uri https://registry.npmjs.org/ionic
15 verbose request no auth needed
16 info attempt registry request try #1 at 1:27:42 PM
17 verbose request id 2f94a6f01110858e
18 http request GET https://registry.npmjs.org/ionic
19 http 200 https://registry.npmjs.org/ionic
20 verbose headers { server: 'nginx/1.10.1',
20 verbose headers   'content-type': 'application/json',
20 verbose headers   'last-modified': 'Fri, 09 Dec 2016 21:44:55 GMT',
20 verbose headers   etag: 'W/"584b25d7-c88a5"',
20 verbose headers   'content-encoding': 'gzip',
20 verbose headers   'cache-control': 'max-age=300',
20 verbose headers   'content-length': '45620',
20 verbose headers   'accept-ranges': 'bytes',
20 verbose headers   date: 'Mon, 12 Dec 2016 11:27:48 GMT',
20 verbose headers   via: '1.1 varnish',
20 verbose headers   age: '262',
20 verbose headers   connection: 'keep-alive',
20 verbose headers   'x-served-by': 'cache-lcy1132-LCY',
20 verbose headers   'x-cache': 'HIT',
20 verbose headers   'x-cache-hits': '2',
20 verbose headers   'x-timer': 'S1481542068.010995,VS0,VE0',
20 verbose headers   vary: 'Accept-Encoding' }
21 silly get cb [ 200,
21 silly get   { server: 'nginx/1.10.1',
21 silly get     'content-type': 'application/json',
21 silly get     'last-modified': 'Fri, 09 Dec 2016 21:44:55 GMT',
21 silly get     etag: 'W/"584b25d7-c88a5"',
21 silly get     'content-encoding': 'gzip',
21 silly get     'cache-control': 'max-age=300',
21 silly get     'content-length': '45620',
21 silly get     'accept-ranges': 'bytes',
21 silly get     date: 'Mon, 12 Dec 2016 11:27:48 GMT',
21 silly get     via: '1.1 varnish',
21 silly get     age: '262',
21 silly get     connection: 'keep-alive',
21 silly get     'x-served-by': 'cache-lcy1132-LCY',
21 silly get     'x-cache': 'HIT',
21 silly get     'x-cache-hits': '2',
21 silly get     'x-timer': 'S1481542068.010995,VS0,VE0',
21 silly get     vary: 'Accept-Encoding' } ]
22 verbose get saving ionic to /Users/thewhozoo/.npm/registry.npmjs.org/ionic/.cache.json
23 verbose correctMkdir /Users/thewhozoo/.npm correctMkdir not in flight; initializing
24 verbose makeDirectory /Users/thewhozoo/.npm creation not in flight; initializing
25 silly makeDirectory /Users/thewhozoo/.npm uid: 501 gid: 20
26 silly install normalizeTree
27 silly loadCurrentTree Finishing
28 silly loadIdealTree Starting
29 silly install loadIdealTree
30 silly cloneCurrentTree Starting
31 silly install cloneCurrentTreeToIdealTree
32 silly cloneCurrentTree Finishing
33 silly loadShrinkwrap Starting
34 silly install loadShrinkwrap
35 silly loadShrinkwrap Finishing
36 silly loadAllDepsIntoIdealTree Starting
37 silly install loadAllDepsIntoIdealTree
38 silly resolveWithNewModule ionic@2.0.0-beta.31 checking installable status
39 silly cache add args [ 'ionic@2.0.0-beta.31', null ]
40 verbose cache add spec ionic@2.0.0-beta.31
41 silly cache add parsed spec Result {
41 silly cache add   raw: 'ionic@2.0.0-beta.31',
41 silly cache add   scope: null,
41 silly cache add   escapedName: 'ionic',
41 silly cache add   name: 'ionic',
41 silly cache add   rawSpec: '2.0.0-beta.31',
41 silly cache add   spec: '2.0.0-beta.31',
41 silly cache add   type: 'version' }
42 silly addNamed ionic@2.0.0-beta.31
43 verbose addNamed "2.0.0-beta.31" is a plain semver version for ionic
44 silly mapToRegistry name ionic
45 silly mapToRegistry using default registry
46 silly mapToRegistry registry https://registry.npmjs.org/
47 silly mapToRegistry data Result {
47 silly mapToRegistry   raw: 'ionic',
47 silly mapToRegistry   scope: null,
47 silly mapToRegistry   escapedName: 'ionic',
47 silly mapToRegistry   name: 'ionic',
47 silly mapToRegistry   rawSpec: '',
47 silly mapToRegistry   spec: 'latest',
47 silly mapToRegistry   type: 'tag' }
48 silly mapToRegistry uri https://registry.npmjs.org/ionic
49 verbose addNameVersion registry:https://registry.npmjs.org/ionic not in flight; fetching
50 verbose get https://registry.npmjs.org/ionic not expired, no request
51 silly mapToRegistry name ionic
52 silly mapToRegistry using default registry
53 silly mapToRegistry registry https://registry.npmjs.org/
54 silly mapToRegistry data Result {
54 silly mapToRegistry   raw: 'ionic',
54 silly mapToRegistry   scope: null,
54 silly mapToRegistry   escapedName: 'ionic',
54 silly mapToRegistry   name: 'ionic',
54 silly mapToRegistry   rawSpec: '',
54 silly mapToRegistry   spec: 'latest',
54 silly mapToRegistry   type: 'tag' }
55 silly mapToRegistry uri https://registry.npmjs.org/ionic
56 verbose addRemoteTarball https://registry.npmjs.org/ionic/-/ionic-2.0.0-beta.31.tgz not in flight; adding
57 verbose addRemoteTarball [ 'https://registry.npmjs.org/ionic/-/ionic-2.0.0-beta.31.tgz',
57 verbose addRemoteTarball   'f96af9a542a2855bab81f56a86c844c1dee07dce' ]
58 info retry fetch attempt 1 at 1:27:46 PM
59 info attempt registry request try #1 at 1:27:46 PM
60 http fetch GET https://registry.npmjs.org/ionic/-/ionic-2.0.0-beta.31.tgz
61 http fetch 200 https://registry.npmjs.org/ionic/-/ionic-2.0.0-beta.31.tgz
62 info retry will retry, error on last attempt: Error: read ECONNRESET
63 silly fetchAndShaCheck shasum f96af9a542a2855bab81f56a86c844c1dee07dce
64 silly rollbackFailedOptional Starting
65 silly rollbackFailedOptional Finishing
66 silly runTopLevelLifecycles Finishing
67 silly install printInstalled
68 verbose stack Error: shasum check failed for /var/folders/vj/3lfg9tn14kzcyzpx9lfyqpr00000gn/T/npm-496-eb36dba1/registry.npmjs.org/ionic/-/ionic-2.0.0-beta.31.tgz
68 verbose stack Expected: f96af9a542a2855bab81f56a86c844c1dee07dce
68 verbose stack Actual:   10ce401a11d1e7c6d7f8e37dbce85a8ea66b655e
68 verbose stack From:     https://registry.npmjs.org/ionic/-/ionic-2.0.0-beta.31.tgz
68 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/sha/index.js:25:8
68 verbose stack     at ReadStream.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/sha/index.js:72:7)
68 verbose stack     at emitNone (events.js:91:20)
68 verbose stack     at ReadStream.emit (events.js:185:7)
68 verbose stack     at endReadableNT (_stream_readable.js:974:12)
68 verbose stack     at _combinedTickCallback (internal/process/next_tick.js:74:11)
68 verbose stack     at process._tickCallback (internal/process/next_tick.js:98:9)
69 verbose cwd /Users/thewhozoo/ionic-apps/theWhoZoo
70 error Darwin 15.0.0
71 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "ionic@2.0.0-beta.31"
72 error node v6.9.2
73 error npm  v3.10.9
74 error shasum check failed for /var/folders/vj/3lfg9tn14kzcyzpx9lfyqpr00000gn/T/npm-496-eb36dba1/registry.npmjs.org/ionic/-/ionic-2.0.0-beta.31.tgz
74 error Expected: f96af9a542a2855bab81f56a86c844c1dee07dce
74 error Actual:   10ce401a11d1e7c6d7f8e37dbce85a8ea66b655e
74 error From:     https://registry.npmjs.org/ionic/-/ionic-2.0.0-beta.31.tgz
75 error If you need help, you may report this error at:
75 error     <https://github.com/npm/npm/issues>
76 verbose exit [ 1, true ]

#2

I have read preceding a command with sudo can possibly solve this. i.e. sudo npm install -g ionic@2.0.0-beta.31. I am in the process of testing this.


#3

Nope. prepending with sudo makes no difference.