如何在Node.js上运行angularjs应用程序?出现错误

时间:2019-03-12 06:47:17

标签: javascript node.js angularjs

我还在学习有角度的知识。 当我尝试运行我的代码时,出现类似以下消息的错误:

> electron@4.0.7 postinstall C:\electron-quick-start\node_modules\electron
> node install.js

Downloading tmp-12340-0-electron-v4.0.7-win32-x64.zip
Error: read ECONNRESET
C:\electron-quick-start\node_modules\electron\install.js:49
  throw err
  ^

Error: read ECONNRESET
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:111:27)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@4.0.7 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron@4.0.7 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\user\AppData\Roaming\npm-cache\_logs\2019-03-12T07_35_01_086Z-debug.log

我该如何解决?

2 个答案:

答案 0 :(得分:0)

使用此命令进行安装:

npm install electron --save-dev

您也可以使用quick start electron js

答案 1 :(得分:0)

您的NodeJS版本也很重要,请使用以下命令检查您的节点版本:

node -v

请阅读本文档
Electron Documentation