NuxtN
Nuxt3y ago
Sun

Impossible to have Nuxt 2 app and Nuxt 3 app in same monorepo

Hey,

I'm working on a monorepo (with turborepo) of a big project using Nuxt 2 as web interface.

I need to create a second web app which using Nuxt 3 but i can't start this app in the monorepo, i got this error when i try to install the project (pnpm i at root):

Scope: all 7 workspace projects
Lockfile is up to date, resolution step is skipped
Already up to date
apps/nuxt3-app postinstall$ nuxt prepare
│ Nuxi 3.0.0
│ ℹ Client built in 7475ms
│ ℹ Building server...
│  ERROR  [commonjs--resolver] Missing "./server-renderer" export in "vue" package
│  ERROR  Missing "./server-renderer" export in "vue" package


I think the problem is because the root node_modules is shared.

I just pushed a simple version of my project here which reproduce the problem:

https://github.com/Suniron/monorepo-nuxt2-nuxt3-problem
GitHub
A simple project to demonstrate the problem with nuxt 2 and nuxt 3 in same monorepo (here using turborepo). - GitHub - Suniron/monorepo-nuxt2-nuxt3-problem: A simple project to demonstrate the prob...
Was this page helpful?