-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
SyntaxError: Identifier '_toDisplayString' has already been declared #428
Comments
I got the same error Reproduction [email protected] |
+1 |
I think this is tracked / discussed here: nuxt/nuxt#23363 |
This looks to me like That is because Nuxt injects this plugin after Histoire solves the issue like this: https://github.com/histoire-dev/histoire/blob/main/packages/histoire-plugin-nuxt/src/index.ts#L172-L181 |
see nuxt-modules/storybook#428 (comment) for more infos
If that would be the case, couldn't we check this by using the |
im fixing it now |
@chakAs3 FYI, I tried fixing the bug by removing the vite plugin include from |
I downloaded an exact copy of the StackBlitz repro and get a different error locally: Error: [nuxt] instance unavailable When running storybook in my actual codebase, I get the double compilation errors discussed above. However, those errors cannot be fixed by downgrading Nuxt to 3.6.
That's all I can do today. Good luck @chakAs3 ! |
This is probably also #442 |
I too have been digging around, sprinkling console.logs throughout the packages in node_modules. The errors are raised by esbuild, which AFAICT isn't a dependency of vite or nuxt. I'll investigate further, to see what I come up with. Edit: Duh, it does say in the message that the error comes from 'vite:vue' in the beginning of the error message. The weird thing is that the error doesn't happen until I make a page load. |
I keep hacking away at this, and these are my findings so far: However, the code handed to I'm still not sure how to fix the problem. Apparently |
Next update:
I am most definitely way out of my comfort zone here, and am starting to look for workarounds (eg just using |
@filiphazardous You could try messaging Daniel Roe on the Nuxt Discord -- he previously offered to pair with me in debugging this issue. For me, this was the straw the broke the camel's back. We'll be dropping Nuxt along with our Vue 2 -> 3 upgrade. |
Hi @bmulholland @filiphazardous please try the latest release of @storybook-vue/nuxt, it is working now with latest version of nuxt 3.8.1, i did not get time to update the examples. so if you could do it. i will be thankful for you. the issue was mainly due the use of 2 different version of vite, in @storybook/vue3-vite and nuxt 3.8.1. i believe it is fixed now |
@chakAs3 The new version works much better. Thanks! |
|
If Is still issue still present? |
Closing this issue due to inactivity 💤 |
This happens when using Nuxt 3.6.5 with this module.
Based on the examples from the docs (where this happens as well).
See this example:
https://storybook.nuxtjs.org/examples/pinia
It throws
Identifier '_createElementVNode' has already been declared
.Could be it has something to do with nuxt 3.7.x. When I downgrade the dependency in the example it seems to work.
The text was updated successfully, but these errors were encountered: