Error installing ionic

npm install ionic is giving me an error…

npm install -g ionic

/root/.nvm/versions/node/v4.3.1/bin/ionic → /root/.nvm/versions/node/v4.3.1/lib/node_modules/ionic/bin/ionic

node-sass@3.4.2 install /root/.nvm/versions/node/v4.3.1/lib/node_modules/ionic/node_modules/node-sass
node scripts/install.js

sh: 1: node: Permission denied
npm ERR! Linux 4.2.0-16-generic
npm ERR! argv “/root/.nvm/versions/node/v4.3.1/bin/node” “/root/.nvm/versions/node/v4.3.1/bin/npm” “install” “-g” “ionic”
npm ERR! node v4.3.1
npm ERR! npm v2.14.12
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR! node-sass@3.4.2 install: node scripts/install.js
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the node-sass@3.4.2 install script ‘node scripts/install.js’.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /root/npm-debug.log

this would seem to indicate that node-sass is having trouble installing, however if i install it with

npm install node-sass

it installs fine.

resolved the issue by not trying to install it globally

so

npm install ionic

worked fine