首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >带nuxt-i18n的Erorr

带nuxt-i18n的Erorr
EN

Stack Overflow用户
提问于 2022-06-14 19:07:08
回答 1查看 376关注 0票数 0

Hello溢出社区。当我在nuxt上开始一个项目时遇到了一个问题。致命的Nuxt构建错误。目前我在程序设计和与服务器上路由相关的错误方面还不是很强,您能帮我解决这个问题吗?

这是Nuxt抛出的错误的主体。

代码语言:javascript
复制
ERROR in ./.nuxt/nuxt-i18n/plugin.routing.js 222:47
Module parse failed: Unexpected token (222:47)
File was processed with these loaders:
 * ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
|       localeLocation: this.localeLocation,
|       // @ts-ignore
>       req: process.server ? this.$root.context?.req || this.$ssrContext?.req : null,
|       route: this.$route,
|       router: this.$router,
 @ ./.nuxt/index.js 17:0-84 259:13-47 260:10-44
 @ ./.nuxt/client.js
 @ multi ./.nuxt/client.js

它还告诉我如何理解错误发生在哪个包中。

代码语言:javascript
复制
 FATAL  Nuxt build error                                                                                                                                                                  

  at WebpackBundler.webpackCompile (node_modules\@nuxt\webpack\dist\webpack.js:2127:21)
  at processTicksAndRejections (node:internal/process/task_queues:96:5)
  at async WebpackBundler.build (node_modules\@nuxt\webpack\dist\webpack.js:2076:5)
  at async Builder.build (node_modules\@nuxt\builder\dist\builder.js:327:5)
  at async Object.run (node_modules\@nuxt\cli\dist\cli-build.js:110:7)
  at async NuxtCommand.run (node_modules\@nuxt\cli\dist\cli-index.js:413:7)

我真的不知道我需要做什么。我尝试删除.nuxt,或者删除node_module中的文件,但是没有帮助。

EN

回答 1

Stack Overflow用户

发布于 2022-06-23 12:20:31

这似乎与这里描述的问题相同:

看看您的Babel配置,并确保在再次运行构建之前有适当的加载器。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72622189

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档