简体   繁体   中英

npm install untar error

I've installed node.js and git hub. I've modified environment variable too. When I go to folder where package.jason file is present and type following command

  npm install

I'm getting untar error. Here is detailed error

pkottawa@PKOTTAWA-LAP /c/Program Files (x86)/nodejs/node_modules
$ cd npm/

pkottawa@PKOTTAWA-LAP /c/Program Files (x86)/nodejs/node_modules/npm
$ npm install
npm ERR! tar.unpack untar error C:\Users\pkottawa\AppData\Roaming\npm-            
cache\nock\0.59.1\package.tgz
npm ERR! tar.unpack untar error C:\Users\pkottawa\AppData\Roaming\npm-cache\requ
ire-inject\1.1.1\package.tgz
npm ERR! tar.unpack untar error C:\Users\pkottawa\AppData\Roaming\npm-cache\mark
ed\0.3.3\package.tgz
npm ERR! tar.unpack untar error C:\Users\pkottawa\AppData\Roaming\npm-cache\npm-
registry-couchapp\2.6.7\package.tgz
npm ERR! tar.unpack untar error C:\Users\pkottawa\AppData\Roaming\npm-cache\npm-
registry-mock\1.0.0\package.tgz
npm ERR! tar.unpack untar error C:\Users\pkottawa\AppData\Roaming\npm-cache\mark
ed-man\0.1.4\package.tgz
npm ERR! tar.unpack untar error C:\Users\pkottawa\AppData\Roaming\npm-cache\tap\
0.5.0\package.tgz
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "c:\\Program Files (x86)\\nodejs\\node.exe" "c:\\Program Files (x8
6)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.12.1
npm ERR! npm  v2.5.1
npm ERR! path c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\nock
npm ERR! code EPERM
npm ERR! errno -4048

npm ERR! Error: EPERM, mkdir 'c:\Program Files (x86)\nodejs\node_modules\npm\nod
e_modules\nock'
npm ERR!     at Error (native)
npm ERR!  { [Error: EPERM, mkdir 'c:\Program Files (x86)\nodejs\node_modules\npm
\node_modules\nock']
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   path: 'c:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modul
es\\nock',
npm ERR!   fstream_type: 'Directory',
npm ERR!   fstream_path: 'c:\\Program Files (x86)\\nodejs\\node_modules\\npm\\no
de_modules\\nock',
npm ERR!   fstream_class: 'DirWriter',
npm ERR!   fstream_stack:
npm ERR!    [ 'c:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\
\fstream\\lib\\dir-writer.js:36:23',
npm ERR!      'c:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\
\mkdirp\\index.js:46:53',
npm ERR!      'FSReqWrap.oncomplete (fs.js:99:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "c:\\Program Files (x86)\\nodejs\\node.exe" "c:\\Program Files (x8
6)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.12.1
npm ERR! npm  v2.5.1

npm ERR! Uncaught, unspecified "error" event.
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     c:\Program Files (x86)\nodejs\node_modules\npm\npm-debug.log
/c/Program Files (x86)/nodejs/npm: line 14:  7208 Signal 112              (core
dumped) "$basedir/node.exe" "$basedir/node_modules/npm/bin/npm-cli.js" "$@"

I was executing this command in wrong directory . Before npm install we need to execute

export PATH=$PATH:directory-to-add

Then run

npm install

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM