2015-11-09 54 views
0

我想从节点JS安装Karma,并尝试安装时,我得到ECONNRESET问题。当我尝试在我的项目文件夹中运行“npm install karma --save-dev”命令时,请在下面找到该错误。节点JS安装 - ECONNRESET问题

D:\Personal\Personal\Xampp\htdocs\project folder>npm install karma --save-dev 
npm WARN optional dep failed, continuing [email protected] 
| 


> [email protected] install D:\Personal\Personal\Xampp\htdocs\project folder\node_modules\karma\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil 
> node-gyp rebuild 


D:\Personal\Personal\Xampp\htdocs\project folder\node_modules\karma\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild) else (rebuild) 
gyp WARN install got an error, rolling back install 
gyp ERR! configure error 
gyp ERR! stack Error: read ECONNRESET 
gyp ERR! stack  at exports._errnoException (util.js:746:11) 
gyp ERR! stack  at TCP.onread (net.js:559:26) 
gyp ERR! System Windows_NT 6.3.9600 
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" 
gyp ERR! cwd D:\Personal\Personal\Xampp\htdocs\project folder\node_modules\karma\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil 
gyp ERR! node -v v0.12.3 
gyp ERR! node-gyp -v v1.0.3 
gyp ERR! not ok 

> [email protected] install D:\Personal\Personal\Xampp\htdocs\project folder\node_modules\karma\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate 
> node-gyp rebuild 


D:\Personal\Personal\Xampp\htdocs\project folder\node_modules\karma\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild) else (rebuild) 
gyp WARN install got an error, rolling back install 
gyp ERR! configure error 
gyp ERR! stack Error: read ECONNRESET 
gyp ERR! stack  at exports._errnoException (util.js:746:11) 
gyp ERR! stack  at TCP.onread (net.js:559:26) 
gyp ERR! System Windows_NT 6.3.9600 
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" 
gyp ERR! cwd D:\Personal\Personal\Xampp\htdocs\project folder\node_modules\karma\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate 
gyp ERR! node -v v0.12.3 
gyp ERR! node-gyp -v v1.0.3 
gyp ERR! not ok 
npm WARN optional dep failed, continuing [email protected] 

> [email protected] install D:\Personal\Personal\Xampp\htdocs\project folder\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil 
> node-gyp rebuild 


D:\Personal\Personal\Xampp\htdocs\project folder\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild) else (rebuild) 
gyp WARN install got an error, rolling back install 
gyp ERR! configure error 
gyp ERR! stack Error: read ECONNRESET 
gyp ERR! stack  at exports._errnoException (util.js:746:11) 
gyp ERR! stack  at TCP.onread (net.js:559:26) 
gyp ERR! System Windows_NT 6.3.9600 
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" 
gyp ERR! cwd D:\Personal\Personal\Xampp\htdocs\project folder\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil 
gyp ERR! node -v v0.12.3 
gyp ERR! node-gyp -v v1.0.3 
gyp ERR! not ok 
npm WARN optional dep failed, continuing [email protected] 

> [email protected] install D:\Personal\Personal\Xampp\htdocs\project folder\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate 
> node-gyp rebuild 


D:\Personal\Personal\Xampp\htdocs\project folder\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild) else (rebuild) 
gyp WARN install got an error, rolling back install 
gyp ERR! configure error 
gyp ERR! stack Error: read ECONNRESET 
gyp ERR! stack  at exports._errnoException (util.js:746:11) 
gyp ERR! stack  at TCP.onread (net.js:559:26) 
gyp ERR! System Windows_NT 6.3.9600 
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" 
gyp ERR! cwd D:\Personal\Personal\Xampp\htdocs\project folder\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate 
gyp ERR! node -v v0.12.3 
gyp ERR! node-gyp -v v1.0.3 
gyp ERR! not ok 
npm WARN optional dep failed, continuing [email protected] 
npm WARN optional dep failed, continuing [email protected] 
[email protected] node_modules\karma 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected]) 
├── [email protected] 
├── [email protected] ([email protected], [email protected], [email protected], [email protected]) 
├── [email protected]1 ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 

任何人都可以请建议一种方法来解决这个问题吗?

任何建议/见解这将不胜感激。

在此先感谢。

回答

-1

我也有类似的问题,我解决了通过执行以下操作:

  1. sudo su 
    
  2. 去了我的项目目录

  3. 运行以下命令

    npm config set strict-ssl false 
    npm install karma --save-dev 
    
  4. npm install karma-jasmine karma-firefox-launcher --save-dev