Can't get Ionic or Cordova set up on computer

#1

Hi all. Having a problem installing Ionic and Cordova. This is what I see:

dsenableroot:: ***Successfully enabled root user.
Davids-MacBook-Air:~ davidtarvin$ npm install -g ionic cordova
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
/usr/local/lib
└── ionic@3.5.0

npm ERR! Darwin 16.6.0
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “-g” “ionic” "cordova"
npm ERR! node v6.11.1
npm ERR! npm v3.10.10
npm ERR! path …/lib/node_modules/cordova/bin/cordova
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall symlink

npm ERR! Error: EACCES: permission denied, symlink ‘…/lib/node_modules/cordova/bin/cordova’ -> '/usr/local/bin/cordova’
npm ERR! at Error (native)
npm ERR! { Error: EACCES: permission denied, symlink ‘…/lib/node_modules/cordova/bin/cordova’ -> '/usr/local/bin/cordova’
npm ERR! at Error (native)
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘symlink’,
npm ERR! path: ‘…/lib/node_modules/cordova/bin/cordova’,
npm ERR! dest: ‘/usr/local/bin/cordova’ }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/davidtarvin/npm-debug.log
Davids-MacBook-Air:~ davidtarvin$

Any ideas? Thanks!

#2

Use nvm to manage your node installations. There is no need to run anything as root.

1 Like