-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
The requested module '/node_modules/jsdoc-type-pratt-parser/dist/index.js?v=dd771ee8' does not provide an export named 'parse' #776
Comments
Could you please provide a minimal reproduction In particular, test if one of the plugins are creating the issue. As a workaround, you may try to add jsdoc-type-pratt-parser to |
This appears to be introduced with 8.3.x in @storybook/core. This is not shown in the online examples linked to StackBlitz from the website. Those examples are currently experiencing a 404 bug looking for /sb-preview/runtime.js. The workaround provided above for |
I got the same error; but the workaround does not work for me. I put The requested module '/node_modules/vue/dist/vue.runtime.esm-bundler.js?v=89f1e65f' does not provide an export named 'useId' package.json:
.storybook/main.ts
|
Not sure if it'll make a difference @cheindl but try adding |
This fixes the error |
Let's try to find a proper solution for this (which might be that we always add the First, it would be good to know with which storybook version this occurs first. Is it 8.3.0 or 8.3.1? In the latter case, this might be triggered by storybookjs/storybook#29134 |
<!-- ☝️ PR title should follow conventional commits (https://conventionalcommits.org). In particular, the title should start with one of the following types: - docs: 📖 Documentation (updates to the documentation or readme) - fix: 🐞 Bug fix (a non-breaking change that fixes an issue) - feat: ✨ New feature/enhancement (a non-breaking change that adds functionality or improves existing one) - feat!/fix!:⚠️ Breaking change (fix or feature that would cause existing functionality to change) - chore: 🧹 Chore (updates to the build process or auxiliary tools and libraries) --> ### 🔗 Linked issue <!-- If it resolves an open issue, please link the issue here. For example "Resolves #123" --> ### 📚 Description Add browser-based tests to verify that Storybook starts in development mode. Aim is to catch errors like #776 <!-- Describe your changes in detail --> <!-- Why is this change required? What problem does it solve? -->
Also getting the same issue its a pretty new setup literally just been installing modules Heres the current packag.json:
|
I could now reproduce it in the upgrade PR to v. 8.3.2 #779, but storybook v 8.3.0 works. So either add the optimizeDep for now (until its fixed upstream with storybookjs/storybook#29179) or force all storybook deps to be v8.3.0. |
Here's a repro with storybook@next, @storybook-vue/nuxt@nightly and @nuxtjs/storybook@nightly |
Thanks @fdendorfer, but this still uses the old version Until then use the workaround from #776 (comment). I'll pin this issue until its fixed. |
The // main.js
const config = {
// ...
addons: [
// ...
{
name: '@storybook/addon-essentials',
options: {
// fix jsdoc-type-pratt-parser
docs: false,
}
},
],
}; |
Somehow, I needed to include vite: {
optimizeDeps: {
include: ['storybook > @storybook/core > jsdoc-type-pratt-parser'],
},
}, vitejs/vite#10047 |
@yshrsmz can confirm that works for me, however when storybook loads up in parallel with the pnpm dev command, i get a |
__
Nice! This worked for me. Storybook runs now (Docker // PNPM // Nuxt 3:latest) It seems some style are broken. Have to check this one |
Happens for me with latest nuxt & vue, someone here with similar behaviour? |
👋 Hey there, fellow travelers of the package dependency maze! So I stumbled upon this issue, and it seems like the command's adding extra packages by default? Or maybe it's just having some fun with us. 🤷♂️ Anyway, I thought I'd drop in a little something for all the lost souls who might land here, wondering why things aren’t working as expected. Turns out, the commented fix below isn't even necessary. Yep, that's right.
For your sanity, here’s the correct "dependencies": {
"nuxt": "latest",
"vue": "latest",
"vue-router": "latest"
},
"devDependencies": {
"@chromatic-com/storybook": "^1.9.0",
"@nuxtjs/storybook": "latest",
"@storybook-vue/nuxt": "latest",
"@storybook/addon-essentials": "8.4.2",
"@storybook/addon-links": "8.4.2",
"@storybook/addon-interactions": "8.4.2",
"@storybook/addon-mdx-gfm": "8.4.2",
"@storybook/blocks": "8.4.2",
"@storybook/test": "8.4.2",
"@types/node": "^18.17.5",
"storybook": "8.4.2",
}, This should hopefully make things smoother for the next traveler passing by. Safe coding, and may your |
@lafllamme does this work for you when running only |
Hi @hacknug, Regarding your first question: Yes, when I run I managed to configure my Vite setup to connect with Nuxt DevTools, but it didn’t work as expected. While I could see modules, tools, settings, and imported composables, I couldn’t view my Storybook components, routes, or similar items. If you’re interested, I can share my configuration for you to explore. Perhaps you might notice something I missed. I also created a bug ticket for this, as it seems related to the Let me know if you want to collaborate on this further! Best regards |
Thank you @lafllamme for guiding us on this journey! However, even though I've followed your package.json to the point, it wasn't the solution. Storybook starts up and than crashed with the error: We've been waiting for months in the hope this package gets fixed with no success so far. :( |
Thanks for sharing your journey so far! Storybook starting up and then crashing is definitely not the destination we’re aiming for. Try adding this to your config: async viteFinal(config) {
return mergeConfig(config, {
resolve: {
alias: {
vue: 'vue/dist/vue.esm-bundler.js',
},
},
// Uncomment this if you need devtools enabled
// devtools: true,
});
} You can see an example of it in action here: Let us know if this helps get things running smoothly. |
@lafllamme I'm very grateful for your help. Storybook seems to be working--for now. Thank you very much :) Though sometimes it "forgets" global components loaded through plugins. Like font-awesome-icon for example. But I'll be able to work around that :) |
The |
Getting above error when adding storybook. It is correctly picking up .stories.ts files
.storybook/main
nuxt config
package.json
The text was updated successfully, but these errors were encountered: