-
Notifications
You must be signed in to change notification settings - Fork 29
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] Package path . is not exported from package @storybook/addon-svelte-csf #124
Comments
Could you create a reproduction repo that exhibits this behavior? The reproduction step "Take existing Svelte project that uses Webpack 5" is not straight forward. |
Hi @JReinhold! Yes, sorry about that. I'm hoping this repo will do the trick. I followed this article to make as simple of an app as possible that uses both Svelte and Webpack. Then I installed |
Thanks! If I remove the addon from the main configuration and remove the
Are you sure that Webpack configuration is valid for a Svelte/Storybook setup? It would be great if we could isolate it so it only fails and warns because of the addon. |
Ah that was silly of me to include the assets in my I've also added the Webpack setting according to the warning you included, so you'll no longer see the warning, however it does not fix the Repo here. |
You need to set the |
Hi @benmccann, thanks for the response! I have added those fields to my webpack config here. However the |
Describe the bug
I'm getting the following error in an existing Svelte project after initing sb. I followed the steps in this article.
Module not found: Error: Package path . is not exported from package node_modules/@storybook/addon-svelte-csf (see exports field in node_modules/@storybook/addon-svelte-csf/package.json)
Here's my
.storybook/main.ts
:My svelte story file copied verbatim from the article:
Steps to reproduce the behavior
npx sb init
@storybook/addon-svelte-csf
and wire it up inmain.ts
npm run storybook
Expected behavior
The
sb init
generated some stories that look like this one:Those work just fine for me. However, when I try to add a Svelte-native story, I get the error shown above and below.
Screenshots and/or logs
ModuleNotFoundError: Module not found: Error: Package path . is not exported from package /node_modules/@storybook/addon-svelte-csf (see exports field in /node_modules/@storybook/addon-svelte-csf/package.json)
Environment
The text was updated successfully, but these errors were encountered: