Open macoley opened 1 year ago
I got a similar error:
I reverted back to older versions... Temporary fix:
This can happen if you have app
folder with pages
folder. If you remove the pages
folder should work. However we can change this logic inside the plugin to take account the current experimental.appDir
instead of looking at the folders.
@aralroca I keep app
and pages
together, because I use tRPC under pages/api/[trpc].tsx
and that approach is way simpler to integrate.
Can you try changing the name of pages
to another one for a moment, only to verify that is for this?
Can you try changing the name of
pages
to another one for a moment, only to verify that is for this?
I just tried that solution, and it seems to work for me. But it would have been great if both folder could cohabit.
I am having the same issue
'use client'
import useTranslation from 'next-translate/useTranslation'
export default function Page() {
const { t } = useTranslation('signin')
return <div className="flex flex-col lg:flex-row w-full">{t('google')}</div>
}
I dont have pages folder. I just removed it. But still failing.. Very similar sign-up page works quite well
Try next-translate-plugin prerelease 2.3.0-canary.1
Now I am having totally different error:
Also now I get the same error when I run npm run dev
Thanks
@bbolek fixed on 2.3.0-canary.2, can you verify it? Thanks!
Hey @aralroca I got this again:
Thank you.
Small update: If I use Server action in related page, I can get build without any problem on version "next-translate-plugin": "^2.0.3",
But if there is no server action in related page, I get exception
Thanks for the comment, is possible to upload the reproducible failing case in some repo to help to fix It? Thanks!
Hey @aralroca, I shared a repo with you : https://github.com/bbolek/next-translate-issue
Thank you
@bbolek looks fixed in:
next-translate
version 2.3.0-canary.3
(you also need to update this one)next-translate-plugin
version 2.3.0-canary.3
@aralroca Still having the issue. updated package.json and pushed to repo
Thanks
What version of this package are you using? 2.0.3 & 2.0.4 NextJS 13, app directory
What operating system, Node.js, and npm version? MacOS/Github actions (debian), node v19.6.0
What happened?
npm run build
is failing when meetsuseTranslation
in server component.My code is rather simply:
What did you expect to happen? Build processes successfully.
Are you willing to submit a pull request to fix this bug? Yes, if I get to know what's failing