Closed masterprompt closed 4 months ago
Could you try out Node.js v18 for testing purposes?
I am getting the same error, and I have node.js v18. @valentinpalkovic @shilman
Worth noting I was able to install storybook in other projects on the same laptop (node v20). For some reason this project just doesnt like it.
I'm having the same problem with "vite". I'm getting this error
SB_CORE-SERVER_0007 (MainFileEvaluationError): Storybook couldn't evaluate your .storybook\main.ts file. Error: Cannot find module 'vite'
@JalalHabeeb Do you have vite installed as a dependency?
@valentinpalkovic, sure I did. This the .storybook/main.ts file `import type { StorybookConfig } from "@storybook/react-vite"; import path from "path"; import tsconfigPaths from "vite-tsconfig-paths";
const config: StorybookConfig = { stories: ["../src/*/.mdx", "../src/*/.stories.@(js|jsx|mjs|ts|tsx)"], addons: [ "@storybook/addon-links", "@storybook/addon-essentials", "@storybook/addon-onboarding", "@storybook/addon-interactions", ], framework: { name: "@storybook/react-vite", options: {}, }, docs: { autodocs: "tag", }, viteFinal: async (config) => { config.plugins?.push( tsconfigPaths({ projects: [path.resolve(path.dirname(__dirname), "tsconfig.json")], }) );
return config;
}, }; export default config;`
When I remove the viteFinal
function, it works. But when I add it it doesn't.
I don't know what is the mistake here.
Can you provide a minimal reproduction? https://storybook.new
Hi there! Thank you for opening this issue, but it has been marked as stale
because we need more information to move forward. Could you please provide us with the requested reproduction or additional information that could help us better understand the problem? We'd love to resolve this issue, but we can't do it without your help!
I'm afraid we need to close this issue for now, since we can't take any action without the requested reproduction or additional information. But please don't hesitate to open a new issue if the problem persists – we're always happy to help. Thanks so much for your understanding.
Can we agree that issues that depend from upgrades cannot provide a minimal reproduction? This has happened to me to, I have no means to show it to you
Describe the bug
npx storybook@latest init
Everything seems to install properly, but once storybook attempts to run for the first time we get:
To Reproduce
cannot reproduce using your instructions. Hoping the stack trace above will help.
System
No response
Additional context
No response