Olá pessoal!
Estou tentando executar o comando npm install -g cordova ionic mas esta apresentando o erro abaixo. Não tenho muita experiência com o Ubuntu. Alguém poderia me ajudar?
Instalei o Nodejs e o NPM mas não sei o que está causando o erro!
Obrigado! Tiago Cosme
tiago@linux:/opt/lampp/htdocs$ npm install -g cordova ionic
npm WARN engine cordova@6.4.0: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.25","npm":"1.4.21"})
npm ERR! tar.unpack untar error /home/tiago/.npm/ionic/2.1.7/package.tgz
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/ionic'
npm ERR! { [Error: EACCES, mkdir '/usr/local/lib/node_modules/ionic']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/ionic',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/local/lib/node_modules/ionic',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/lib/nodejs/fstream/lib/dir-writer.js:36:23',
npm ERR! '/usr/lib/nodejs/mkdirp/index.js:46:53',
npm ERR! 'Object.oncomplete (fs.js:107:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 4.2.0-35-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "cordova" "ionic"
npm ERR! cwd /opt/lampp/htdocs
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! path /usr/local/lib/node_modules/ionic
npm ERR! fstream_path /usr/local/lib/node_modules/ionic
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules/ionic'
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/dir-writer.js:36:23
npm ERR! fstream_stack /usr/lib/nodejs/mkdirp/index.js:46:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! error rolling back Error: EACCES, unlink '/usr/local/bin/cordova'
npm ERR! error rolling back cordova@6.4.0 { [Error: EACCES, unlink '/usr/local/bin/cordova'] errno: 3, code: 'EACCES', path: '/usr/local/bin/cordova' }
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /opt/lampp/htdocs/npm-debug.log
npm ERR! not ok code 0
tiago@linux:/opt/lampp/htdocs$