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:
https://github.com/begueradj/nuxti18nerror
yarn create nuxt-app my-project
, then install the plugin: yarn add nuxt-i18n
, then add it to the configuration file nuxt.config.js
as the official documentation says: modules: [ ['nuxt-i18n', { // Options }] ]
I expect to launch the server without errors when I run yarn run dev
. As simple as that.
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.
For anyone stumbling on the same issue, my boss solved the problem as soon as I informed him about it:
yarn add acorn-walk
(I think the solution is self explanatory)
Update: