aralroca / next-translate

Next.js plugin + i18n API for Next.js 🌍 - Load page translations and use them in an easy way!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't resolve 'next-translate/appWithI18n' on 2.7.0-canary.1

acidfernando opened this issue · comments

What version of this package are you using?
2.7.0-canary.1

What operating system, Node.js, and npm version?
macOS 12.2.1, NodeJS version: 20.9.0, npm version: 10.1.0. NextJS: 13.5.6 (not app folder)

What happened?
Running the app (building or with dev server) throws the error on the title.

What did you expect to happen?
Not to throw

Are you willing to submit a pull request to fix this bug?
With some clues as to where to look, yes

I can't reproduce it @acidfernando . Can you try with 3.0.0-canary.1 in both (next-translate & next-translate-plugin) ? Thanks

With that version I'm getting Module not found: Can't resolve 'next-translate-plugin/loader'. I'll try to create a repro

Here's a repro: https://codesandbox.io/p/devbox/next-translate-build-hk9t38

Maybe I'm doing something wrong? Same code works correctly on v2.6.2

Also, this repro uses app router, but the project I first reported the bug was on pages router.

Hope it helps!

Ok, looks like a problem generating the tarball of npm that avoids adding some necessary files. Thanks to report

3.0.0-canary.2 tarball is correct. I hope know it works

Yes, that did it. Thanks for the fix!