Ionic 2 & Node 7.4.0


#1

On my Mac Sierra i’ve Nodejs 7.4.0 and i’ve tried to install Ionic so:

sudo npm install -g cordova ionic
npm WARN deprecated node-uuid@1.4.7: use uuid module instead
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated node-uuid@1.3.3: use uuid module instead
/usr/local/lib
└─┬ cordova@6.4.0
β”œβ”€β”¬ cordova-common@1.5.1
β”‚ └── osenv@0.1.4
β”œβ”€β”¬ cordova-lib@6.4.0
β”‚ β”œβ”€β”¬ cordova-js@4.2.0
β”‚ β”‚ └─┬ browserify@13.1.0
β”‚ β”‚ β”œβ”€β”¬ browser-resolve@1.11.2
β”‚ β”‚ β”‚ └── resolve@1.1.7
β”‚ β”‚ β”œβ”€β”¬ crypto-browserify@3.11.0
β”‚ β”‚ β”‚ └─┬ browserify-sign@4.0.0
β”‚ β”‚ β”‚ └─┬ parse-asn1@5.0.0
β”‚ β”‚ β”‚ └── asn1.js@4.9.1
β”‚ β”‚ β”œβ”€β”€ JSONStream@1.3.0
β”‚ β”‚ β”œβ”€β”€ resolve@1.2.0
β”‚ β”‚ └─┬ stream-http@2.6.0
β”‚ β”‚ └── builtin-status-codes@3.0.0
β”‚ β”œβ”€β”€ cordova-serve@1.0.1
β”‚ └─┬ init-package-json@1.9.4
β”‚ └─┬ read@1.0.7
β”‚ └── mute-stream@0.0.7
└─┬ insight@0.8.4
β”œβ”€β”¬ configstore@1.4.0
β”‚ └── write-file-atomic@1.3.0
└─┬ request@2.79.0
β”œβ”€β”¬ har-validator@2.0.6
β”‚ └─┬ is-my-json-valid@2.15.0
β”‚ └── jsonpointer@4.0.1
└─┬ http-signature@1.1.1
└─┬ sshpk@1.10.1
└── tweetnacl@0.14.5

npm WARN In ionic@2.1.18 replacing bundled version of cross-spawn with cross-spawn@4.0.2
npm WARN In ionic@2.1.18 replacing bundled version of semver with semver@4.2.0
npm WARN In ionic@2.1.18 replacing bundled version of mime-types with mime-types@2.0.14
npm WARN In ionic@2.1.18 replacing bundled version of form-data with form-data@0.2.0
npm WARN In ionic@2.1.18 replacing bundled version of request with request@2.51.0
npm WARN In ionic@2.1.18 replacing bundled version of ionic-app-lib with ionic-app-lib@2.1.9
npm ERR! Darwin 16.3.0
npm ERR! argv β€œ/usr/local/bin/node” β€œ/usr/local/bin/npm” β€œinstall” β€œ-g” β€œcordova” "ionic"
npm ERR! node v7.4.0
npm ERR! npm v4.0.5
npm ERR! path /usr/local/lib/node_modules/.staging/ansi-392b32ed
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename

npm ERR! enoent ENOENT: no such file or directory, rename β€˜/usr/local/lib/node_modules/.staging/ansi-392b32ed’ -> '/usr/local/lib/node_modules/ionic/node_modules/cordova-lib/node_modules/ansi’
npm ERR! enoent ENOENT: no such file or directory, rename β€˜/usr/local/lib/node_modules/.staging/ansi-392b32ed’ -> '/usr/local/lib/node_modules/ionic/node_modules/cordova-lib/node_modules/ansi’
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR! /Users/mauro/Documents/Ionic Apps/npm-debug.log

Some help? thanks


#2

Looks like your cordova install is failing.
try running

npm cache clean
and then run
npm install -g cordova and see if this works. Then you can try installing ionic


#3

Completely uninstall ionic and cordova and then reinstall. This is a known issue when upgrading.


#4

Sudo should no longer be required for npm in OSX Sierra.

If it fails without sudo, I’d advice towards a reinstall of node and npm.


#5

Works perfectly, thanks!