question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to generate dynamic story source: TypeError: can't access property "_vnode", storyNode is null

See original GitHub issue

Describe the bug The bug coming like this in my app, where it supposed to not appearing in @nuxtjs/storybook v.3.2.0 or before related 6.1.4. I thought its affect to the docs stories that won’t load before, but i’ve configured it again. and now its loaded perfectly. and but then, it keeps showing error :

Failed to generate dynamic story source: TypeError: can't access property "_vnode", storyNode is null

To Reproduce Steps to reproduce the behavior:

  1. I already configured the stories and config, and also no any indication error in chromatic test as well,
  2. each time i press on selected stories, the warn log keep adding, and its adding again when visit another stories.

Expected behavior No any warning log appearing each time selecting stories

Screenshots If applicable, add screenshots to help explain your problem.

image

you can try it, in my open source deployed app here : talkiebuddy.github.io/talkiebuddy-ssr-app

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:5

github_iconTop GitHub Comments

1reaction
alfredgm45commented, Mar 17, 2022

@ahmadalfy in my case this error happened when I was creating a decorator and I was using the render function ex:

export default makeDecorator({
  name: 'darkMode',
  parameterName: 'dark',
  wrapper: (story, context) => ({
    render: h => h(story(context))
  })
})

and the solution was adding Vue.extend

export default makeDecorator({
  name: 'darkMode',
  parameterName: 'dark',
  wrapper: (story, context) => Vue.extend({
    render: h => h(story(context))
  })
})

the error "Failed to generate dynamic story source: TypeError: can't access property "_vnode", storyNode is null" happens in the first code case, because in the wrapper property I was passing a vue instance, and this needs to be attached to an HTML element to be mounted, so for that reason the storyNode was null, in the second case, well, Vue.extend creates a “subclass” of the base Vue constructor, and when this new constructor is called, this returns a VueComponent, this can be used in any parts of your app.

I hope, this can help you. 🙂

0reactions
ahmadalfycommented, Oct 3, 2021

@fbtwitter did you find a way to fix this? I am having the same problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

storybookjs/storybook (Raised $170.00) - Issuehunt
[Bug]: TypeError: Cannot read properties of undefined (reading ... Ensure error message you get when using storiesOf in ssv7 mode is very clear....
Read more >
storybook cannot read properties of undefined - You.com
The TypeError: Cannot read properties of undefined (reading 'type') exception occurs in storybook when one defines the argTypes in the default export object ......
Read more >
Storybook Addon Next
A no config Storybook addon that makes Next.js features just work in Storybook.
Read more >
Storybook throws error: undefined is not iterable (cannot read ...
Not sure how I can get rid of it? My storybook file ReactTypical.stories.tsx is so simple: import React from 'react' ...
Read more >
Broken build with updated Storybook (5.3) Configuration
n&viewMode=story:70 unable to connect to top frame for connecting dev ... Blocked a frame with origin "null" from accessing a cross-origin ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found