When using the latest versions of Nuxt and Storybook, Vue DevTools and Nuxt DevTools do not work as expected. I encounter the following errors when running npx nuxt storybook!
When using the latest versions of Nuxt and Storybook, Vue DevTools and Nuxt DevTools do not work as expected. I encounter the following errors when running npx nuxt storybook:
Errors (translated to English)
WebSocket Connection Error:
Firefox cannot establish a connection to the server at ws://localhost:6006/_nuxt/. client:535:18
DOMException:
Uncaught (in promise) DOMException: An invalid or illegal string was specified
NuxtJS 5
setupWebSocket
fallback
setupWebSocket
setupWebSocket
<anonymous>
Reproduction Steps
Initialize a new Nuxt project.
Add Storybook using @nuxtjs/storybook and @storybook-vue/nuxt.
Start Storybook using npx nuxt storybook.
Open the browser and check for Vue or Nuxt DevTools availability.
Expected Behavior
Vue DevTools should load properly in the browser.
Nuxt DevTools should be accessible via Shift + Alt + D.
What I Tried
Creating a Nuxt plugin to enable Vue DevTools explicitly:
The issue seems to be a conflict between Storybook's WebSocket server and Nuxt DevTools.
I suspect that Storybook might be overriding or interfering with Nuxt's WebSocket configurations (ws://localhost:6006/_nuxt/).
Environment Details
Nuxt Version: Latest
Storybook Version: 8.4.2
Node Version: 18.17.5
Browser: Firefox (latest)
Question
Why is Storybook or Nuxt setting Vue.config.devtools = false by default when running npx nuxt storybook? Is there a way to ensure both Nuxt DevTools and Storybook can coexist without these conflicts?
Let me know if you'd like to clarify anything else or add further details!
Environment
When using the latest versions of Nuxt and Storybook, Vue DevTools and Nuxt DevTools do not work as expected. I encounter the following errors when running npx nuxt storybook!
Image
Reproduction
#
Describe the bug
DevTools Not Working in Nuxt with Storybook
Description
When using the latest versions of Nuxt and Storybook, Vue DevTools and Nuxt DevTools do not work as expected. I encounter the following errors when running
npx nuxt storybook
:Errors (translated to English)
WebSocket Connection Error:
DOMException:
Reproduction Steps
@nuxtjs/storybook
and@storybook-vue/nuxt
.npx nuxt storybook
.Expected Behavior
Shift + Alt + D
.What I Tried
Creating a Nuxt plugin to enable Vue DevTools explicitly:
However, this did not resolve the issue.
Ensuring HMR configuration in
nuxt.config.ts
:This also did not work, and the WebSocket error persists.
Current Environment
Here’s my
package.json
:Additional Notes
ws://localhost:6006/_nuxt/
).Environment Details
Question
Why is Storybook or Nuxt setting
Vue.config.devtools = false
by default when runningnpx nuxt storybook
? Is there a way to ensure both Nuxt DevTools and Storybook can coexist without these conflicts?Let me know if you'd like to clarify anything else or add further details!
Additional context
No response