In my Nuxt.js application, I want to use the newest version (5.4.2) of nuxt-i18n. I used it previously without any problems, but I do not understand what is going wrong now:
Version
Reproduction link
https://github.com/begueradj/nuxti18nerror
Steps to reproduce
- Either clone my project and follow the README file instructions
- Or create the a Nuxt.js project:
yarn create nuxt-app my-project
, then install the plugin:yarn add nuxt-i18n
, then add it to the configuration filenuxt.config.js
as the official documentation says:modules: [ ['nuxt-i18n', { // Options }] ]
What is expected ?
I expect to launch the server without errors when I run yarn run dev
. As simple as that.
What is actually happening?
When I run yarn run dev
I am getting this error message:
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.