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

@nuxt/icon not working in histoire #746

Open
6 tasks done
awacode21 opened this issue Jul 22, 2024 · 4 comments
Open
6 tasks done

@nuxt/icon not working in histoire #746

awacode21 opened this issue Jul 22, 2024 · 4 comments
Labels
to triage This issue needs to be triaged

Comments

@awacode21
Copy link

Describe the bug

I added @nuxt/icon to my project. In the project it is working fine but in histoire it is not working.
In histoire it is not able to render the stories that contain components that use @nuxt/icon.

On devtools console you always see the error:
Bildschirmfoto 2024-07-22 um 21 10 24

it doesn't matter if mode is css or svg, it doesn't matter if from iconify icon libs, global components or custom collections, it is simple not able to work with it. The error is always the same.

Reproduction

https://stackblitz.com/edit/nuxt-starter-kckxy8

run the histoire to see the story not getting rendered and the console error in devtools.

System Info

MacBook Pro Apple M2 Max 14.2.1 (23C71), Google Chrome Browser Version 126.0.6478.127 (Offizieller Build) (arm64)

Used Package Manager

npm

Validations

@awacode21 awacode21 added the to triage This issue needs to be triaged label Jul 22, 2024
Copy link

stackblitz bot commented Jul 22, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@anhnm96
Copy link

anhnm96 commented Jul 27, 2024

You can install [email protected] instead of @nuxt/icon and update the modules in nuxt.config.ts.
It seems like @nuxt/icon doesn't work with Histoire since version 1.0.0.

https://stackblitz.com/edit/nuxt-starter-gp2mej?file=nuxt.config.ts

@awacode21
Copy link
Author

@xiaosasori thanks for the workaround. Do you know if custom collections were already working in 0.6.10 with same syntax? cause i don't get it running with 0.6.10

@anhnm96
Copy link

anhnm96 commented Aug 9, 2024

@awacode21 it's impossible because customCollections is a new feature introduced in version 1.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants