nuxt使用generate生成静态文件报错
以下是错误信息:
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
原因就是 nuxt.js 构建过程中触发了 ajax,结果请求失败了呗,楼主把项目穿 github 看看吧