使用npm run serve命令启动前端服务报错

Blade 未结 1 1036
小绵羊
小绵羊 剑童 2020-07-17 10:33

一、该问题的重现步骤是什么?

1. 使用npm run serve命令启动前端服务报错,请问是什么原因?

2. image.png

3.


二、你期待的结果是什么?实际看到的又是什么?


三、你正在使用的是什么产品,什么版本?在什么操作系统上?

vue前端,商业版


四、请提供详细的错误堆栈信息,这很重要。

PS C:\work1\work_items\project\Saber-dev1.0> npm run serve


> saber-admin@2.4.0 serve C:\work1\work_items\project\Saber-dev1.0

> vue-cli-service serve


 INFO  Starting development server...

11% building 15/17 modules 2 active C:\work1\work_items\project\Saber-dev1.0\node_modules\_classlist-polyfill@1.2.0@classlist-polyfill\src\index.js_http_outgoing.js:464

    throw err;

    ^


TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["www-authenticate"]

    at ServerResponse.setHeader (_http_outgoing.js:473:3)

    at setHeader (C:\work1\work_items\project\Saber-dev1.0\node_modules\_http-proxy@1.18.1@http-proxy\lib\http-proxy\passes\web-outgoing.js:98:15)

    at C:\work1\work_items\project\Saber-dev1.0\node_modules\_http-proxy@1.18.1@http-proxy\lib\http-proxy\passes\web-outgoing.js:124:7

    at Array.forEach (<anonymous>)

    at Array.writeHeaders (C:\work1\work_items\project\Saber-dev1.0\node_modules\_http-proxy@1.18.1@http-proxy\lib\http-proxy\passes\web-outgoing.js:119:35)

    at ClientRequest.<anonymous> (C:\work1\work_items\project\Saber-dev1.0\node_modules\_http-proxy@1.18.1@http-proxy\lib\http-proxy\passes\web-incoming.js:177:22)

    at ClientRequest.emit (events.js:198:13)

    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:556:21)

    at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17)

    at Socket.socketOnData (_http_client.js:442:20)

    at Socket.emit (events.js:198:13)

    at addChunk (_stream_readable.js:288:12)

    at readableAddChunk (_stream_readable.js:269:11)

    at Socket.Readable.push (_stream_readable.js:224:10)

    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! saber-admin@2.4.0 serve: `vue-cli-service serve`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the saber-admin@2.4.0 serve 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\DELL\AppData\Roaming\npm-cache\_logs\2020-07-17T02_27_45_715Z-debug.log

五、若有更多详细信息,请在下面提供。

1条回答
提交回复