nuxt使用generate生成静态文件报错

发布于 2022-09-12 02:14:21 字数 2428 浏览 12 评论 0

以下是错误信息:

 ERROR   /Search                                                      16:34:24

Error: Request failed with status code 404
    at createError (F:\stupid\nuxt_client\node_modules\axios\lib\core\createErro
r.js:16:15)
    at settle (F:\stupid\nuxt_client\node_modules\axios\lib\core\settle.js:17:12
)
    at IncomingMessage.handleStreamEnd (F:\stupid\nuxt_client\node_modules\axios
\lib\adapters\http.js:236:11)
    at IncomingMessage.emit (events.js:215:7)
    at IncomingMessage.EventEmitter.emit (domain.js:475:20)
    at endReadableNT (_stream_readable.js:1184:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)


 ERROR  Request failed with status code 404                           16:34:24

  at createError (node_modules\axios\lib\core\createError.js:16:15)
  at settle (node_modules\axios\lib\core\settle.js:17:12)
  at IncomingMessage.handleStreamEnd (node_modules\axios\lib\adapters\http.js:23
6:11)
  at IncomingMessage.emit (events.js:215:7)
  at IncomingMessage.EventEmitter.emit (domain.js:475:20)
  at endReadableNT (_stream_readable.js:1184:12)
  at processTicksAndRejections (internal/process/task_queues.js:80:21)


 ERROR   /                                                            16:34:24

Error: Request failed with status code 404
    at createError (F:\stupid\nuxt_client\node_modules\axios\lib\core\createErro
r.js:16:15)
    at settle (F:\stupid\nuxt_client\node_modules\axios\lib\core\settle.js:17:12
)
    at IncomingMessage.handleStreamEnd (F:\stupid\nuxt_client\node_modules\axios
\lib\adapters\http.js:236:11)
    at IncomingMessage.emit (events.js:215:7)
    at IncomingMessage.EventEmitter.emit (domain.js:475:20)
    at endReadableNT (_stream_readable.js:1184:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)


 ERROR  Request failed with status code 404                           16:34:24

  at createError (node_modules\axios\lib\core\createError.js:16:15)
  at settle (node_modules\axios\lib\core\settle.js:17:12)
  at IncomingMessage.handleStreamEnd (node_modules\axios\lib\adapters\http.js:23
6:11)
  at IncomingMessage.emit (events.js:215:7)
  at IncomingMessage.EventEmitter.emit (domain.js:475:20)
  at endReadableNT (_stream_readable.js:1184:12)
  at processTicksAndRejections (internal/process/task_queues.js:80:21)

Done in 20.53s.

报错的页面都使用axios请求一个api,api的url保存在.env里。
求解救!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

短暂陪伴 2022-09-19 02:14:21

原因就是 nuxt.js 构建过程中触发了 ajax,结果请求失败了呗,楼主把项目穿 github 看看吧

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文