Replies: 2 comments
-
|
Hi @teknotica! I'm Dosu and I’m helping the storybook team. The ESLint errors are due to breaking changes in Storybook v9.x: many package import paths have changed. For docs blocks, you now need to import from If you still see unresolved module errors after updating imports, make sure your ESLint config is set up for ESM resolution. If you're using Vite, you may also want to add this to your export default {
viteFinal: async (config) => {
config.resolve = config.resolve || {};
config.resolve.conditions = ['module', 'import', 'require'];
return config;
}
}This helps Vite (and sometimes ESLint) resolve ESM modules correctly [discussion]. Once you update your imports and check your config, the errors should go away. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
|
Resolved this issue by adding these lines to our 'import/resolver': {
typescript: { // <------ Adding this object
alwaysTryTypes: true,
project: './tsconfig.json'
},
node: {
paths: ['src'],
extensions: ['.js', '.jsx', '.ts', '.tsx']
}
} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Hi 👋🏽
I've just migrated our project from version
8.6.12to9.1.13following your migration notes. We've updated all the paths for the storybook modules etc, however, ESLint keeps complaining about the new paths:What's weird is that the project is building correctly, so it's Storybook and all its stories 🤔
What are we missing? 👀 HELP!
Thanks a lot in advance.
Additional information
Here's how our
package.jsonis looking right now:Here's a snippet of one of the components having issues with the ESLint error:
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions