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] Exact same Stories doesn't render same way regarding their location ( ./src/** vs ./node_modules/** ) #183

Open
LeMouf opened this issue Jun 2, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@LeMouf
Copy link

LeMouf commented Jun 2, 2024

Describe the bug

Using addon-svelte-csf to create svelte stories, it work perfectly when they are in the src folder tree, but as soon as they are package ( exact same file ) and end up in the node_modules folder tree, it seems to lose something and end up to an errors :

No primary story attached to this docs file, did you forget to use <Meta of={} />?

image

Steps to reproduce the behavior

  1. add a package with component and stories using addon-svelte-csf

  2. add the same components + stories in a forlder in src file tree

  3. configure the main.ts to use the stories of the src and the node_modules folders
    image

  4. launch storybook, an see the src one working as expected and the node_modules reach an error ( cf: screenshot )

Expected behavior

Same Behavior for the two kind of usage, as for a classic stories this way of doing work without any issues

Environment

  • OS: Windows
  • Node.js version: v21.5.0
  • NPM version: 10.5.0
@LeMouf LeMouf added the bug Something isn't working label Jun 2, 2024
@JReinhold
Copy link
Collaborator

I suspect this is a duplicate of storybookjs/storybook#27178

Could you try with a some regular, none-Svelte CSF stories and see if it's still an issue?

@LeMouf
Copy link
Author

LeMouf commented Jun 3, 2024

it's look like a similar one but with regular none-Svelte CSF stories it work without any issue.
it specificaly broke when i use an addon-svelte-csf one :/

i try the workaround describe in the link you provide without any success for the moment :(

@JReinhold
Copy link
Collaborator

Alright.

Could you create a repository with a minimal reproduction of the issue?

You can use https://storybook.new as a template

@LeMouf
Copy link
Author

LeMouf commented Jun 3, 2024

Sure, i have setup a repository and a package to reproduce the bug and illustrate the issue :

repo : https://github.com/LeMouf/nodemodule-svelte-csf

with 2 differents components stories, one classic csf, one with svelte csf both localy in the repo and in the package

Clone the repo

Edit the .npmrc file to setup your personnal authToken

run `npm run storybook`

=> the classic and the svelte csf work fine, for the package only the classic work fine not the svelte one :/

package : https://github.com/LeMouf/package-svelte-csf

Clone the repo

run `npm run storybook`

=> both classic and svelte work fine

Thanks for your help !

@LeMouf
Copy link
Author

LeMouf commented Jun 10, 2024

@JReinhold the repo suit your need to test it ?

@JReinhold
Copy link
Collaborator

Repro looks good. I don't know when I'll have time to look into it as I just had a kid that needs my attention.

Anyone is free to pick this up.

@LeMouf
Copy link
Author

LeMouf commented Jun 11, 2024

@JReinhold Congratulations on the arrival of your child, it's normal to prioritize it :) take care of the family

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants