vue项目一打开网页就报这个错?


  App running at:
  - Local:   https://localhost:8080/ 
  - Network: https://192.168.9.119:8080/

  Note that the development build is not optimized.
  To create a production build, run npm run build.

internal/stream_base_commons.js:62
  var err = req.handle.writev(req, chunks, allBuffers);
                       ^

TypeError: req.handle.writev is not a function
    at writevGeneric (internal/stream_base_commons.js:62:24)
    at Socket._writeGeneric (net.js:711:5)
    at Socket._writev (net.js:720:8)
    at doWrite (_stream_writable.js:408:12)
    at clearBuffer (_stream_writable.js:517:5)
    at Socket.Writable.uncork (_stream_writable.js:314:7)
    at connectionCorkNT (_http_outgoing.js:641:8)
    at process._tickCallback (internal/process/next_tick.js:63:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ylcx-admin@2.0.0 dev: `vue-cli-service serve --open --mode developments --https`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ylcx-admin@2.0.0 dev 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!     /Users/laiyinan/.npm/_logs/2020-12-14T03_41_09_547Z-debug.log
The terminal process "/bin/zsh '-c', 'npm run dev'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

如何解决?

阅读 19.5k
3 个回答

已解决
是因为axios和node版本不兼容
用nvm换一个低版本的node
然后删除依赖 重新install
问题解决了
具体是啥原因我能力有限 只有看懂node源码才能知道了

加console,或者断点一级一级看看把

你是用了vscode吧,可能是vscode的bug,建议换一个编辑器,重新下载项目试试

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题