Open ryoppippi opened 1 year ago
OK, I found a solution.
.storybook/main.ts
import type { StorybookConfig } from '@storybook/sveltekit';
import { join, dirname } from 'path';
/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
function getAbsolutePath(value: string): any {
return dirname(require.resolve(join(value, 'package.json')));
}
const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
getAbsolutePath('@storybook/addon-links'),
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@storybook/addon-interactions')
],
framework: {
- name: getAbsolutePath('@storybook/sveltekit'),
+ name: '@storybook/sveltekit',
options: {}
},
docs: {
autodocs: 'tag'
}
};
export default config;
But I think the auto integration should be fixed
Got the same issue and can confirm the suggested change worked!
Noticed that this issue probably has to do with the Windows file system, but I'm not sure. I set up a pnpm workspace in my wsl and had no problems, but my co-worker working on Windows got this issue. Thanks to this issue we have a workaround.
@jobnbackpack this happened on my MacBook btw
We just upgraded to Storybook 8 and got the same issue from the migration? Any news on this problem?
Describe the bug
I got error with sveltekit+pnpm monorepo
To Reproduce
And you got error like
System
Additional context
No response