Error: EACCES: Berechtigung verweigert

Ich rennenpm install lodash aber es wirftError: EACCES: Berechtigung verweigert Error. Ich weiß, dass es sich um ein Berechtigungsproblem handelt, aber meines Wissens ist die sudo-Berechtigung nicht erforderlich, um das Knotenmodul lokal zu installieren. Wenn ich es mit sudo starte, wird es im Ordner ~ / node_modules installiert. drwxrwxr-x ist die Dateiberechtigung des vorhandenen Ordners. Ich kann nicht herausfinden, was schief gelaufen sein könnte.

Below ist die Fehlermeldung.

npm ERR! tar.unpack untar error /home/rupesh/.npm/lodash/4.13.1/package.tgz
npm ERR! Linux 3.13.0-88-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "lodash"
npm ERR! node v4.3.1
npm ERR! npm  v2.14.12
npm ERR! path /home/rupesh/node_modules/lodash
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir

npm ERR! Error: EACCES: permission denied, mkdir '/home/rupesh/node_modules/lodash'
npm ERR!     at Error (native)
npm ERR!  { [Error: EACCES: permission denied, mkdir '/home/rupesh/node_modules/lodash']
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/home/rupesh/node_modules/lodash',
npm ERR!   fstream_type: 'Directory',
npm ERR!   fstream_path: '/home/rupesh/node_modules/lodash',
npm ERR!   fstream_class: 'DirWriter',
npm ERR!   fstream_stack: 
npm ERR!    [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:35:25',
npm ERR!      '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:47:53',
npm ERR!      'FSReqWrap.oncomplete (fs.js:82:15)' ] }
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/rupesh/Desktop/es6/npm-debug.log

Antworten auf die Frage(18)

Ihre Antwort auf die Frage