Skip to content
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

[Bug]: Unexpected closing tag on story #21424

Closed
RCVarley opened this issue Mar 6, 2023 · 6 comments · Fixed by #22518
Closed

[Bug]: Unexpected closing tag on story #21424

RCVarley opened this issue Mar 6, 2023 · 6 comments · Fixed by #22518
Assignees

Comments

@RCVarley
Copy link

RCVarley commented Mar 6, 2023

Describe the bug

The [Stack.Recursive](https://github.com/RCVarley/unexpected-closing-tag-error/blob/main/src/stories/ElStack.stories.ts story produces the error:

SyntaxError: Unexpected closing tag "div". It may happen when the tag has already been closed by another tag.

template: `
    <ElStack v-bind="args" style="min-height: 20rem">
        <div>This</div>
        <div>is</div>
        <div>
            <div>a</div>
            <div>recursive</div>
        </div>
        <div>stack</div>
    </ElStack>`

The issue is with the nested div.

To Reproduce

Nest divs (or any other element) in a story template and view the story.

https://github.com/RCVarley/unexpected-closing-tag-error/blob/main/src/stories/ElStack.stories.ts

System

System:
    OS: macOS 13.2.1
    CPU: (10) arm64 Apple M1 Pro
  Binaries:
    Node: 18.14.2 - ~/.nvm/versions/node/v18.14.2/bin/node
    npm: 9.5.0 - ~/.nvm/versions/node/v18.14.2/bin/npm
  Browsers:
    Chrome: 110.0.5481.177
    Safari: 16.3
  npmPackages:
    @storybook/addon-essentials: ^7.0.0-beta.61 => 7.0.0-beta.61 
    @storybook/addon-interactions: ^7.0.0-beta.61 => 7.0.0-beta.61 
    @storybook/addon-links: ^7.0.0-beta.61 => 7.0.0-beta.61 
    @storybook/blocks: ^7.0.0-beta.61 => 7.0.0-beta.61 
    @storybook/testing-library: ^0.0.14-next.1 => 0.0.14-next.1 
    @storybook/vue3: ^7.0.0-beta.61 => 7.0.0-beta.61 
    @storybook/vue3-vite: ^7.0.0-beta.61 => 7.0.0-beta.61

Additional context

No response

@shilman
Copy link
Member

shilman commented Mar 17, 2023

@chakAs3 do you think this is related to your recent vue3 changes?

@shilman shilman moved this to Required for GA in Core Team Projects Mar 17, 2023
@shilman shilman moved this from Required for GA to Nice to have in Core Team Projects Mar 21, 2023
@chakAs3 chakAs3 self-assigned this Apr 1, 2023
@chakAs3
Copy link
Contributor

chakAs3 commented Apr 1, 2023

I don't think so @shilman i remember answering someone about this issue it is 100% some other component in his code creates this issue and vue compiler complains about this. it can not be from the story as the story will through error in runtime not the build time, he must have some component in yarn cache with some issue.

i will add his story to the examples repo https://github.com/storybookjs/vue3-vuetify-examples/blob/main/src/stories/EStack.stories.ts

@RCVarley
Copy link
Author

RCVarley commented Apr 6, 2023

@chakAs3 thanks for getting back to us! I’ll clear my caches and then try a bunch of different barebones setups.

I’ll let you know how my testing goes.

@chakAs3 chakAs3 mentioned this issue Apr 6, 2023
5 tasks
Copy link
Contributor

chakAs3 commented Apr 6, 2023

@RCVarley it maybe some bug related to source snippet which is addressed in #21956

@gluecksmensch
Copy link

gluecksmensch commented Apr 30, 2023

What I've observed is that the error only occurs when the args attribute is passed by the render function. See some examples in this duplicated ticket

@chuckmah
Copy link

chuckmah commented May 3, 2023

For us the issue only happen when we use the backtick (string litteral) in the template.. the error is gone when using single or double quote.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants