2016-04-20 4 views
0

verweigert Ich versuche, cordova mit npm install -g cordova in meinem ubuntu (15,10), aber immer den folgenden FehlerNicht in der Lage cordova Fehler zu installieren wie die Erlaubnis

npm WARN locking Error: EACCES, open '/home/gopi/.npm/_locks/cordova-fa12e2e096426a32.lock' 
npm WARN locking  at Error (native) 
npm WARN locking /home/gopi/.npm/_locks/cordova-fa12e2e096426a32.lock failed { [Error: EACCES, open '/home/gopi/.npm/_locks/cordova-fa12e2e096426a32.lock'] 
npm WARN locking errno: -13, 
npm WARN locking code: 'EACCES', 
npm WARN locking path: '/home/gopi/.npm/_locks/cordova-fa12e2e096426a32.lock' } 
npm ERR! Linux 4.2.0-30-generic 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "cordova" 
npm ERR! node v0.12.7 
npm ERR! npm v2.11.3 

npm ERR! Attempt to unlock /usr/local/lib/node_modules/cordova, which hasn't been locked 
npm ERR! 
npm ERR! If you need help, you may report this error at: 
npm ERR!  <https://github.com/npm/npm/issues> 

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

ich zu installieren, wenn ich ionic build android zu geben versuche ich bin immer Dieser Fehler und auch, wenn ich cordova -v versuchen, die aktuelle Version zu überprüfen, bekomme ich den gleichen Fehler.

/usr/local/lib/node_modules/cordova/node_modules/update-notifier/node_modules/configstore/index.js:53 
       throw err; 
        ^
Error: EACCES, permission denied '/home/gopi/.config/configstore/update-notifier-cordova.json' 
You don't have access to this file. 

    at Error (native) 
    at Object.fs.openSync (fs.js:500:18) 
    at Object.fs.readFileSync (fs.js:352:15) 
    at Object.create.all.get (/usr/local/lib/node_modules/cordova/node_modules/update-notifier/node_modules/configstore/index.js:34:26) 
    at Object.Configstore (/usr/local/lib/node_modules/cordova/node_modules/update-notifier/node_modules/configstore/index.js:27:44) 
    at new UpdateNotifier (/usr/local/lib/node_modules/cordova/node_modules/update-notifier/index.js:34:17) 
    at module.exports (/usr/local/lib/node_modules/cordova/node_modules/update-notifier/index.js:123:23) 
    at checkForUpdates (/usr/local/lib/node_modules/cordova/src/cli.js:64:20) 
    at cli (/usr/local/lib/node_modules/cordova/src/cli.js:116:5) 
    at Object.<anonymous> (/usr/local/lib/node_modules/cordova/bin/cordova:41:1) 

hat jemand Ahnung, warum die Erlaubnis verweigert wird, habe ich versucht, auch mit sudo npm install -g cordova aber immer noch dem gleichen Ergebnis.

Antwort

0

Es scheint eine Erlaubnis Problem zu sein, versuchen Sie:

sudo chown -R $(whoami) "$HOME/.npm" 
+0

OP sagte sie mit sudo –

+0

wenig Erklärung versucht bitte dieses Befehls –

+0

@rbumier nach dem Code ich versucht, die gleichen Probleme am faceing –

Verwandte Themen