Error: Cannot find module 'next-translate-plugin'
Closed this issue · 2 comments
marcusnunes commented
What version of this package are you using?
2.5.3
What operating system, Node.js, and npm version?
MacOS: 12.6.9 Monterey
Node.js: v16.20.0
Yarn 1.22.4
What happened?
I have next-translate-plugin
in my devDependencies
but I'm getting this error:
'next-translate-plugin' should be listed in the project's dependencies. Run 'npm i -S next-translate-plugin' to add it
Because of that, we I try to build in prodution I'm getting this other error:
out: $ next build
err: ⨯ Failed to load next.config.js, see more info here https://nextjs.org/docs/messages/next-config-error
err: > Build error occurred
err: Error: Cannot find module 'next-translate-plugin'
What did you expect to happen?
Work as a devDependencies.
I'm still using next-translate 1.6.0
because of that.
Are you willing to submit a pull request to fix this bug?
joeltio commented
I have this same problem and aralroca/next-translate-plugin#65 suggests to put next-translate-plugin
in dependencies instead of dev dependencies. After doing so it works for me.
aralroca commented
Duplicated of aralroca/next-translate-plugin#65