Npm WARN locking Error


#1

i installed nodejs as user and when i run this command for install ionic 'npm install -g cordova ionic ’ on ubuntu 15.04
i got it error :
npm WARN engine cordova-js@4.0.0: wanted: {“node”:"~0.10.x"} (current: {“node”:“0.12.7”,“npm”:“2.11.3”})
npm WARN engine npm@1.3.4: wanted: {“node”:">=0.6",“npm”:“1”} (current: {“node”:“0.12.7”,“npm”:“2.11.3”})
npm WARN engine cordova-js@4.0.0: wanted: {“node”:"~0.10.x"} (current: {“node”:“0.12.7”,“npm”:“2.11.3”})
npm WARN engine npm@1.3.4: wanted: {“node”:">=0.6",“npm”:“1”} (current: {“node”:“0.12.7”,“npm”:“2.11.3”})
npm WARN engine xmlbuilder@2.2.1: wanted: {“node”:“0.8.x || 0.10.x”} (current: {“node”:“0.12.7”,“npm”:“2.11.3”})
npm WARN engine xmlbuilder@2.2.1: wanted: {“node”:“0.8.x || 0.10.x”} (current: {“node”:“0.12.7”,“npm”:“2.11.3”})
npm WARN installMany normalize-package-data was bundled with npm@1.3.4, but bundled package wasn’t found in unpacked tree
npm WARN installMany normalize-package-data was bundled with npm@1.3.4, but bundled package wasn’t found in unpacked tree
/home/lakhdar/.nvm/versions/v0.12.7/bin/ionic -> /home/lakhdar/.nvm/versions/v0.12.7/lib/node_modules/ionic/bin/ionic
npm ERR! Linux 3.19.0-25-generic
npm ERR! argv “/home/lakhdar/.nvm/versions/v0.12.7/bin/node” “/home/lakhdar/.nvm/versions/v0.12.7/bin/npm” “install” “-g” “cordova” "ionic"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! path /home/lakhdar/.npm/browserify-aes/1.0.3
npm ERR! code EACCES
npm ERR! errno -13

npm ERR! Error: EACCES, mkdir '/home/lakhdar/.npm/browserify-aes/1.0.3’
npm ERR! at Error (native)
npm ERR! { [Error: EACCES, mkdir ‘/home/lakhdar/.npm/browserify-aes/1.0.3’]
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! path: ‘/home/lakhdar/.npm/browserify-aes/1.0.3’,
npm ERR! parent: ‘crypto-browserify’ }
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! /home/lakhdar/npm-debug.log
thank you ionic’ers


#2

It’s very likely that your ~/.;npm was create"d upon your first installation of nodejs as root.
Fix it:

sudo chown -R `whoami` ~/.npm

#3

thanks a lot but i have another error
when i run ionic emulate android i got this error

emulator: ERROR: This AVD’s configuration is missing a kernel file!!
emulator: ERROR: ANDROID_SDK_ROOT is undefined
how i can fix it
good luck bro


#4

It means that you don’t have a kernel image for the emulated device you selected but maybe you did not create any device in the emulator. Read the Android docs