Node.js npm安装卸载程序错误
我已经安装了node.js和git hub。我也修改了环境变量。 当我转到package.jason文件所在的文件夹并键入以下命令时Node.js npm安装卸载程序错误,node.js,git,npm,Node.js,Git,Npm,我已经安装了node.js和git hub。我也修改了环境变量。 当我转到package.jason文件所在的文件夹并键入以下命令时 npm install 我发现了一个错误。 下面是详细的错误 pkottawa@PKOTTAWA-LAP /c/Program Files (x86)/nodejs/node_modules $ cd npm/ pkottawa@PKOTTAWA-LAP /c/Program Files (x86)/nodejs/node_modules/npm $ np
npm install
我发现了一个错误。
下面是详细的错误
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" "$@"
pkottawa@PKOTTAWA-LAP/c/程序文件(x86)/nodejs/NodeU模块
$cd npm/
pkottawa@PKOTTAWA-LAP/c/程序文件(x86)/nodejs/NodeU模块/npm
$npm安装
npm错误!tar.unpack untar错误C:\Users\pkottawa\AppData\Roaming\npm-
cache\nock\0.59.1\package.tgz
npm错误!tar.unpack untar错误C:\Users\pkottawa\AppData\Roaming\npm cache\requ
ire注入\1.1.1\package.tgz
npm错误!tar.unpack untar错误C:\Users\pkottawa\AppData\Roaming\npm cache\mark
ed\0.3.3\package.tgz
npm错误!tar.unpack untar错误C:\Users\pkottawa\AppData\Roaming\npm cache\npm-
注册表couchapp\2.6.7\package.tgz
npm错误!tar.unpack untar错误C:\Users\pkottawa\AppData\Roaming\npm cache\npm-
注册表模拟\1.0.0\package.tgz
npm错误!tar.unpack untar错误C:\Users\pkottawa\AppData\Roaming\npm cache\mark
ed man\0.1.4\package.tgz
npm错误!tar.unpack untar错误C:\Users\pkottawa\AppData\Roaming\npm cache\tap\
0.5.0\package.tgz
npm错误!Windows NT 6.1.7601
npm错误!argv“c:\\Program Files(x86)\\nodejs\\node.exe”c:\\Program Files(x8)
6) \\nodejs\\node\u模块\\npm\\bin\\npm cli.js“安装”
npm错误!节点v0.12.1
npm错误!npm v2.5.1
npm错误!路径c:\ProgramFiles(x86)\nodejs\node\u modules\npm\node\u modules\nock
npm错误!代码EPERM
npm错误!errno-4048
npm错误!错误:EPERM,mkdir'c:\Program Files(x86)\nodejs\node\u modules\npm\nod
e_模块\nock'
npm错误!错误(本机)
npm错误!{[错误:EPERM,mkdir'c:\ProgramFiles(x86)\nodejs\node\u modules\npm
\节点\u模块\nock']
npm错误!错误号:-4048,
npm ERR!代码:“EPERM”,
npm ERR!路径:“c:\\Program Files(x86)\\nodejs\\node\u modules\\npm\\node\u module”
es\\nock',
npm ERR!fstream_类型:“目录”,
npm ERR!fstream\u路径:“c:\\Program Files(x86)\\nodejs\\node\u模块\\npm\\no
de_模块\\nock',
npm ERR!fstream_类:“DirWriter”,
npm ERR!fstream\u堆栈:
npm错误!['c:\\ProgramFiles(x86)\\nodejs\\node\u模块\\npm\\node\u模块\
\fstream\\lib\\dir writer.js:36:23',
npm ERR!c:\\Program Files(x86)\\nodejs\\node\u modules\\npm\\node\u modules\
\mkdirp\\index.js:46:53',
npm ERR!'FSReqWrap.oncomplete(fs.js:99:15)']}
npm错误!
npm错误!请以root/管理员身份再次尝试运行此命令。
npm错误!Windows NT 6.1.7601
npm错误!argv“c:\\Program Files(x86)\\nodejs\\node.exe”c:\\Program Files(x8)
6) \\nodejs\\node\u模块\\npm\\bin\\npm cli.js“安装”
npm错误!节点v0.12.1
npm错误!npm v2.5.1
npm错误!未捕获的未指定“错误”事件。
npm错误!
npm错误!如果需要帮助,您可以在以下位置报告此错误:
npm错误!
npm错误!请在任何支持请求中包括以下文件:
npm错误!c:\ProgramFiles(x86)\nodejs\node\u modules\npm\npm-debug.log
/c/程序文件(x86)/nodejs/npm:line 14:7208信号112(核心
转储“$basedir/node.exe”“$basedir/node_modules/npm/bin/npm cli.js”“$@”
我在错误的目录中执行此命令。
在安装npm之前,我们需要执行
export PATH=$PATH:directory-to-add
然后跑
npm install
这根本没有意义,npm是全局安装的,请检查nodeJS文档,您的设置是错误的。对于读者来说,不要遵循这个建议。