Node.js 在第一个XHR请求中出现HPE_INVALID_常量错误,导致崩溃
我正在开发一个AngularJS 1.7.x应用程序(开始于3年前),当我开始使用Gulp时,它就是我要使用的工具 昨天,当我继续我的应用程序工作时,第一个XHR请求突然崩溃 因此,我运行“gulp serve”,它打开chrome的登录页面,所有内容都正确加载,然后单击登录按钮,它向我的PHP后端(由Apache/2.4.37(Unix)PHP/7.2.14提供服务)发出REST调用 我的项目的package.json在很长一段时间内没有改变。 我最近更新了npm(6.9.0)和node(8.11.1),但它并不是最新的Node.js 在第一个XHR请求中出现HPE_INVALID_常量错误,导致崩溃,node.js,angularjs,npm,gulp,Node.js,Angularjs,Npm,Gulp,我正在开发一个AngularJS 1.7.x应用程序(开始于3年前),当我开始使用Gulp时,它就是我要使用的工具 昨天,当我继续我的应用程序工作时,第一个XHR请求突然崩溃 因此,我运行“gulp serve”,它打开chrome的登录页面,所有内容都正确加载,然后单击登录按钮,它向我的PHP后端(由Apache/2.4.37(Unix)PHP/7.2.14提供服务)发出REST调用 我的项目的package.json在很长一段时间内没有改变。 我最近更新了npm(6.9.0)和node(8.
[12:14:13] Starting 'serve'...
[HPM] Proxy created: /rest -> http://localhost/
[12:14:13] Finished 'serve' after 49 ms
[BrowserSync SPA] Running...
[Browsersync] Access URLs:
--------------------------------------
Local: http://localhost:3000/
External: http://192.168.1.21:3000/
--------------------------------------
UI: http://localhost:3001
UI External: http://localhost:3001
--------------------------------------
[Browsersync] Serving files from: .tmp/serve
[Browsersync] Serving files from: src
[HPM] Error occurred while trying to proxy request /rest/authenticate from localhost:3000 to http://localhost/ (HPE_INVALID_CONSTANT) (https://nodejs.org/api/errors.html#errors_common_system_errors)
events.js:183
throw er; // Unhandled 'error' event
^
Error: write after end
at write_ (_http_outgoing.js:622:15)
at ServerResponse.write (_http_outgoing.js:617:10)
at IncomingMessage.ondata (_stream_readable.js:639:20)
at emitOne (events.js:116:13)
at IncomingMessage.emit (events.js:211:7)
at IncomingMessage.Readable.read (_stream_readable.js:475:10)
at flow (_stream_readable.js:846:34)
at resume_ (_stream_readable.js:828:3)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
在我的php后端,我的配置文件给出了一个空的“ReCaptcha”秘密,最终导致gulp/proxy崩溃。。。 无法理解为什么ReCaptcha抛出的错误会使代理如此混乱