-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nuxt-edge Object(...)() is null / context is null #644
Comments
Oh hey, a fellow nuxt bridge user^^ |
Hi @warflash |
Oh actually, looking at your repro repo it does seem like you're missing a few nuxt and bridge specific things. This comment here shows an example of making vue-echarts work on nuxt3 https://github.com/nuxt/framework/discussions/2474#discussioncomment-1850092 but I did not find a way to make it work on bridge yet |
Please, check repo again. I actually use nuxt 2 (nuxt-edge is actually nuxt 2.16 with Vue 2.7 inside).
All other my codebase works fine except vue-echarts. So I create minimal repoduction exaple to report bug that vue-echart not works with nuxt-edge (aka nuxt 2.16 that will be released in a few months) |
Try add this to {
alias: {
vue: 'vue/dist/vue.runtime.esm.js'
}
} |
@Justineo thank you, workaround is working! |
Not sure there's anything can be done on our side. It seems that with Nuxt's webpack config, the imported |
Closing as a workaround is available. |
Confirmation
How are you introducing Vue-ECharts into your project?
ES Module imports
Versions
Details
I have a project with vue-echart and nuxt 2 (version 2.15).
I try to start migration to nuxt 3. First steps is to upgrade
nuxt
tonuxt-edge
. It requires to remove@nuxtjs/composition-api
cause Nuxt 2.16 is based on Vue 2.7. At this step I expect that all will run fine. Cause Vue 2.7 supports composition API.But it not.
Here is my browser console output:
There are serveral warnings:
[Vue warn]: inject() can only be used inside setup() or functional components.
[Vue warn]: globally imported h() can only be invoked when there is an active component instance, e.g. synchronously in a component's render or setup function.
[Vue warn]: The client-side rendered virtual DOM tree is not matching server-rendered content. This is likely caused by incorrect HTML markup, for example nesting block-level elements inside <p>, or missing <tbody>. Bailing hydration and performing full client-side render.
And two errors:
TypeError: Object(...)() is null
and
TypeError: context is null
Reproduction
https://github.com/niklv/nuxt_echarts_bug
The text was updated successfully, but these errors were encountered: