nuxt/cli

Nuxi takes wrong Vue.js version

Opened this issue · 0 comments

Hello everyone,

I have a monorepo (turbo) with several Nuxt 3 applications and an old Nuxt Bridge application.

At the moment, I can't upgrade the Nuxt Bridge application to Nuxt 3, so, to avoid any conflict, I've put this application in a /standalone/web folder with its own pnpm-workspace.yaml (I know I can't use any turbo functionality for this application but that's not a problem, the primary goal being to have only one git repo to maintain).

The problem is that for nearly two weeks now, my Nuxt Bridge application seems to be trying to use Vue 3 (exactly the version installed in monorepo applications!) under the hood instead of the Vue 2 version.

I can see the error (along with many others like it) below in the browser when I start my Nuxt Bridge application in dev with pnpm nuxi dev :

/workspaces/xrator-operator/node_modules/.pnpm/@vue+runtime-dom@3.4.19/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js 1806:4-8 "export 'warn' was not found in '/workspaces/monorepo/standalone/web/.nuxt/runtime.vue2-bridge.ce329bf2.mjs'

And this log (along with many others like it) in the terminal:

[friendly-errors 10:07:26 AM] WARN in /workspaces/monorepo/node_modules/.pnpm/vue@3.4.19_typescript@5.3.3/node_modules/vue/dist/vue.runtime.esm-bundler.js

[friendly-errors 10:07:26 AM] "Export 'warn' was not found in '/workspaces/monorepo/standalone/web/.nuxt/runtime.vue2-bridge.ce329bf2.mjs'

If I try to change the version of Vue 3 in monorepo applications (to 3.4.19 for example), the new version is printed in the errors seen above.

The behavior is the same in a development container or in WSL2.

I need your help, I had a similar error a few months ago and the solution was to separate the Nuxt Bridge application into its own folder, but the nightmare seems to appear again 😭.

To help me, at least (if it's too difficult to reproduce / find a fix) what is the best way to create a monorepo using turbo / pnpm with Nuxt Bridge and Nuxt 3 applications?

Thanks in advance 🙏

It seems to be similar than nuxt/bridge#61