无法将新节点添加到Node-RED

时间:2019-02-19 15:22:09

标签: node.js node-red

我正在尝试将Node-RED仪表板(https://flows.nodered.org/node/node-red-dashboard)添加到Windows PC上的Node-RED安装中。我继续收到以下错误日志:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   '--save',
1 verbose cli   '--save-prefix=~',
1 verbose cli   '--production',
1 verbose cli   'cn-dashboard-nodes@0.0.2' ]
2 info using npm@6.4.1
3 info using node@v8.12.0
4 verbose npm-session 0f8d3b4b5636f37c
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData error for cn-dashboard-nodes@0.0.2 request to http://registry.npmjs.org/cn-dashboard-nodes failed, reason: connect ECONNREFUSED 127.0.0.1:8888
8 timing stage:rollbackFailedOptional Completed in 2ms
9 timing stage:runTopLevelLifecycles Completed in 73356ms
10 verbose type system
11 verbose stack FetchError: request to http://registry.npmjs.org/cn-dashboard-nodes failed, reason: connect ECONNREFUSED 127.0.0.1:8888
11 verbose stack     at ClientRequest.req.on.err (C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:68:14)
11 verbose stack     at emitOne (events.js:116:13)
11 verbose stack     at ClientRequest.emit (events.js:211:7)
11 verbose stack     at Socket.socketErrorListener (_http_client.js:387:9)
11 verbose stack     at emitOne (events.js:116:13)
11 verbose stack     at Socket.emit (events.js:211:7)
11 verbose stack     at emitErrorNT (internal/streams/destroy.js:66:8)
11 verbose stack     at _combinedTickCallback (internal/process/next_tick.js:139:11)
11 verbose stack     at process._tickCallback (internal/process/next_tick.js:181:9)
12 verbose cwd C:\Users\RAM1ER\.node-red
13 verbose Windows_NT 10.0.10240
14 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save" "--save-prefix=~" "--production" "cn-dashboard-nodes@0.0.2"
15 verbose node v8.12.0
16 verbose npm  v6.4.1
17 error code ECONNREFUSED
18 error errno ECONNREFUSED
19 error FetchError: request to http://registry.npmjs.org/cn-dashboard-nodes failed, reason: connect ECONNREFUSED 127.0.0.1:8888
19 error     at ClientRequest.req.on.err (C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:68:14)
19 error     at emitOne (events.js:116:13)
19 error     at ClientRequest.emit (events.js:211:7)
19 error     at Socket.socketErrorListener (_http_client.js:387:9)
19 error     at emitOne (events.js:116:13)
19 error     at Socket.emit (events.js:211:7)
19 error     at emitErrorNT (internal/streams/destroy.js:66:8)
19 error     at _combinedTickCallback (internal/process/next_tick.js:139:11)
19 error     at process._tickCallback (internal/process/next_tick.js:181:9)
19 error  { FetchError: request to http://registry.npmjs.org/cn-dashboard-nodes failed, reason: connect ECONNREFUSED 127.0.0.1:8888
19 error     at ClientRequest.req.on.err (C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:68:14)
19 error     at emitOne (events.js:116:13)
19 error     at ClientRequest.emit (events.js:211:7)
19 error     at Socket.socketErrorListener (_http_client.js:387:9)
19 error     at emitOne (events.js:116:13)
19 error     at Socket.emit (events.js:211:7)
19 error     at emitErrorNT (internal/streams/destroy.js:66:8)
19 error     at _combinedTickCallback (internal/process/next_tick.js:139:11)
19 error     at process._tickCallback (internal/process/next_tick.js:181:9)
19 error   message: 'request to http://registry.npmjs.org/cn-dashboard-nodes failed, reason: connect ECONNREFUSED 127.0.0.1:8888',
19 error   type: 'system',
19 error   errno: 'ECONNREFUSED',
19 error   code: 'ECONNREFUSED',
19 error   stack: 'FetchError: request to http://registry.npmjs.org/cn-dashboard-nodes failed, reason: connect ECONNREFUSED 127.0.0.1:8888\n    at ClientRequest.req.on.err (C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-fetch-npm\\src\\index.js:68:14)\n    at emitOne (events.js:116:13)\n    at ClientRequest.emit (events.js:211:7)\n    at Socket.socketErrorListener (_http_client.js:387:9)\n    at emitOne (events.js:116:13)\n    at Socket.emit (events.js:211:7)\n    at emitErrorNT (internal/streams/destroy.js:66:8)\n    at _combinedTickCallback (internal/process/next_tick.js:139:11)\n    at process._tickCallback (internal/process/next_tick.js:181:9)' }
20 error If you are behind a proxy, please make sure that the
20 error 'proxy' config is set properly.  See: 'npm help config'
21 verbose exit [ 1, true ]

我在公司网络中,我认为最可能的原因与代理服务器设置有关。但是通过Node-RED论坛时,我一直找不到合适的解决方案。

Node-RED是否可以解决此问题?在为Node-RED安装任何其他npm软件包时,我遇到相同的问题。

1 个答案:

答案 0 :(得分:0)

似乎是代理问题。 我也面临着同样的问题。当您使用公司网络时,就会发生这种情况。您可能需要CNTLM(企业NT Lan经理)。目前,我正在起诉Cntlm并能够在网络代理后面安装软件包。如果您需要其他帮助,请告诉我。