Open langalex opened 1 year ago
I had the same problem. I also tried vite just to see what would happen -- and same error.
Also seeing this on npm v 9.7.1 Windows 11 OS, node v18.12.0 webpack v5.86.0
This looks like a CLI bug with the project generator.
If you manually edit the project and change @storybook/ember-webpack5
to @storybook/ember
everywhere, does that fix the problem?
I was able to get passed this error by editing node_modules/@storybook/cli/dist/generate.js
and setting frameworkPackage="@storybook/ember"
when it's calling getFrameworkPackage()
but then hit a rabbit hole of other issues:
sh: start-storybook: command not found
so I updated the package.json
to "storybook": "storybook dev"
but then hit Cannot find module '@storybook/ember/preset'
npx storybook upgrade
but then hit Failed to load preset: "@storybook/ember/preset" \n Error: Cannot find module './dist/cjs/preset'
react
and react-dom
for some reason (I'm not using React) but after installing, it was able to build and launch the website but then immediately fails.ModuleNotFoundError: Module not found: Error: Can't resolve 'fs'
and related errors in the console."@storybook/addon-mdx-gfm"
from the addons.core: { builder: '@storybook/builder-webpack5', }
to the main.js
config.Expected your framework's preset to export a 'renderToCanvas' field.
I tried lots of other various things I didn't document sorry but I wasn't able to get storybook 7.0
or 6.5
working with fresh Ember 4.x
or 5.x
apps. I think there is a fundamental issue with Storybook and Ember. I'm using Node.js 16.19.0
on macos 13.4
.
I tried npx sb init --builder @storybook/builder-vite
and it worked for me. At least to use it and run it...
@apovedq Could you provide more info on how it worked for you?
I just did: ember create test-ember-sb
to create a new Ember app (5.4.0
) and then ran npx sb init --builder @storybook/builder-vite
to add Storybook. Running the script storybook adds results in an error right away:
npm run storybook
> test-ember-sb@0.0.0 storybook
> start-storybook -p 6006 -s dist
sh: start-storybook: command not found
Describe the bug
I'm getting an error when trying to add storybook 7 to a new Ember app. When runing
npx storybook@latest init
, I get asked which builder to use, and when then selecting Webpack 5, it tries to install a package that does not exist (@storybook/ember-webpack5). Error also happens when selecting Vite.To Reproduce
System
Additional context
Current storybook version on npm is 7.0.12.