A problem occurs when applying next-translate in yarn workspace monorepo, nextjs 13 environment.
environment:
- yarn berry
- yarn workspace monorepo
- next-translate
- nextjs 13
- folder structure enter image description here
app package.json
"name": "admin-coaching",
"packageManager": "[email protected]",
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"analyze": "ANALYZE=true yarn build"
},
"dependencies": {
"@mdx-js/loader": "2.3.0",
"@mdx-js/react": "2.3.0",
"@next/mdx": "13.2.1",
"next": "13.2.0",
"next-translate": "2.0.1",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@next/bundle-analyzer": "13.1.6",
"@types/node": "18.13.0",
"@types/react": "18.0.28",
"next-translate-plugin": "2.0.2",
"typescript": "4.9.5"
}
}
- error image enter image description here
help me ~
It works normally in the yarn berry environment, but it doesn't work only in the monorepo environment.
Got the same issue with the same configuration as you (except that I'm using NextJS 14). I just switched to next-intl and now everything works fine!