Composition-api: fix: two versions of vue included in app

Created on 24 Jun 2021  Â·  12Comments  Â·  Source: nuxt-community/composition-api

After updating ^0.23.4 → ^0.24.5 I see dev messages 2 times. Saw some braking changes for 0.24.0 (esm), do I have to make some changes? Not clear what was the change. Is this something I shouldn't worry about?

Thanks

vue.runtime.esm.js:8440
Download the Vue Devtools extension for a better development experience:
https://github.com/vuejs/vue-devtools
vue.runtime.esm.js:8440
You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html

vue.runtime.common.dev.js:8403
Download the Vue Devtools extension for a better development experience:
https://github.com/vuejs/vue-devtools
vue.runtime.common.dev.js:8412
You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html

bug

Most helpful comment

@danielroe Hi Daniel,
Because author's topic no response, i create a repo to demoe issue here. I got same issue with him today when try setup new Nuxt and add nuxt-composition-api. Both Nuxt and plugin is fresh new ( no custom anything). Isuse can see after run npm run dev. See in devtool at homepage will have 2 production tip message come from 2 difference vue file. Look like Nuxt use esm file and plugin use common.dev file.

https://github.com/TrungRueta/dev-bug-composition-api-nuxt

image

Let me know if you need anything else.
Thanks for help!!

ps: you can confirm this by go to nuxt.config.ts. and add this config. After restart server you can see Nuxt's vue disabled production tip, remain message is from plugin. :
image

All 12 comments

That message is pretty self-explanatory - it's just recommending you download Vue Devtools. You can review changes in the CHANGELOG or releases.

"That message is pretty self-explanatory - it's just recommending you download Vue Devtools" not a helpful message. Why getting it twice is the question.

@viktor-anyvan My apologies - I misunderstood your original question. And you're right, we wouldn't expect to see two messages. It seems that two different versions of Vue are being included in your project (esm and cjs). Are you transpiling vue? Could you provide a reproduction (or your) nuxt.config)?

Sure Daniel, is there a way to share somewhere else (don't want to be public)?

@viktor-anyvan You'd be welcome to share it directly with me.

@danielroe sent an email few days ago. Any updates?

@viktor-anyvan Thanks for the email. As it turns out, there's no easy giveaway in your nuxt.config; I'd need to see a reproduction.

With my package.json would you be able to start a new project and see do you get the issue? Or how should we do it?

@viktor-anyvan If you can create a repo that replicates the issue, I can have a look.

@danielroe Hi Daniel,
Because author's topic no response, i create a repo to demoe issue here. I got same issue with him today when try setup new Nuxt and add nuxt-composition-api. Both Nuxt and plugin is fresh new ( no custom anything). Isuse can see after run npm run dev. See in devtool at homepage will have 2 production tip message come from 2 difference vue file. Look like Nuxt use esm file and plugin use common.dev file.

https://github.com/TrungRueta/dev-bug-composition-api-nuxt

image

Let me know if you need anything else.
Thanks for help!!

ps: you can confirm this by go to nuxt.config.ts. and add this config. After restart server you can see Nuxt's vue disabled production tip, remain message is from plugin. :
image

Also note this reproduction: https://github.com/nonlinearcom/nuxt-use-test

Fix released in 0.26.0 - let me know if that doesn't work for you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

samnap11 picture samnap11  Â·  6Comments

namadnuno picture namadnuno  Â·  4Comments

JoeyYoung1997 picture JoeyYoung1997  Â·  7Comments

theartkod picture theartkod  Â·  3Comments

Quineone picture Quineone  Â·  5Comments