代码之家  ›  专栏  ›  技术社区  ›  Billal Begueradj

无法使用nuxt-i18n(版本5.4.2)

  •  0
  • Billal Begueradj  · 技术社区  · 7 年前

    在我的Nuxt.js应用程序中,我想使用 nuxt-i18n

    版本

    v5.4.2

    https://github.com/begueradj/nuxti18nerror

    复制步骤

    1. 或者克隆我的项目并按照自述文件的说明进行操作
    2. 或者创建a Nuxt.js项目: yarn create nuxt-app my-project yarn add nuxt-i18n ,然后将其添加到配置文件中 nuxt.config.js modules: [ ['nuxt-i18n', { // Options }] ]

    期望什么?

    我希望在运行时无错误地启动服务器 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.
    
    1 回复  |  直到 7 年前
        1
  •  0
  •   Billal Begueradj    7 年前

    对于任何在同一问题上遇到绊脚石的人,我一通知老板,他就解决了问题:

    yarn add acorn-walk
    

    更新:

    This fixed