【问题标题】:Can not use nuxt-i18n (version 5.4.2)不能使用 nuxt-i18n(版本 5.4.2)
【发布时间】:2019-03-17 08:21:15
【问题描述】:

在我的 Nuxt.js 应用程序中,我想使用 nuxt-i18n 的最新版本 (5.4.2)。以前用过没问题,现在不明白是怎么回事:

版本

v5.4.2

复制链接

https://github.com/begueradj/nuxti18nerror

重现步骤

  1. 克隆我的项目并按照 README 文件说明进行操作
  2. 或者创建一个Nuxt.js项目:yarn create nuxt-app my-project,然后安装插件:yarn add nuxt-i18n,然后添加到配置文件nuxt.config.js,官方文档说:modules: [ ['nuxt-i18n', { // Options }] ]

预期什么?

我希望在运行yarn run dev 时能够正确启动服务器。就这么简单。

实际发生了什么?

当我运行 yarn run dev 时,我收到以下错误消息:

 INFO  Building project

✖ fatal /home/begueradj/nuxti18nerror/node_modules/nuxt-i18n/src/helpers/components.js:1
  Error: Cannot find module 'acorn-walk'
  at Object.<anonymous> (/home/begueradj/nuxti18nerror/node_modules/nuxt-i18n/src/helpers/components.js:5:16)
  at Object.Module._extensions..js (module.js:664:10)
Nuxt Fatal Error :(
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

【问题讨论】:

    标签: javascript nuxt.js nuxt-i18n


    【解决方案1】:

    对于遇到相同问题的任何人,我的老板在我通知他后立即解决了问题:

    yarn add acorn-walk
    

    (我认为解决方案是不言自明的)

    更新:

    This 现在正式成为fixed

    【讨论】:

      猜你喜欢
      • 2019-09-19
      • 2019-08-21
      • 1970-01-01
      • 2021-12-03
      • 2021-08-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多