I have an existing project where I plan to enable storybook.
What I did was:
npx -p @storybook/cli sb init --type angular
When I start the project I see theese errros:
ERROR in .../src/stories/0-Welcome.stories.ts
ERROR in .../src/stories/0-Welcome.stories.ts(1,25):
TS2307: Cannot find module '@storybook/angular/demo'.
But modules are there and code suggest is working fine.
My Package.json
"@storybook/addon-actions": "^5.3.17",
"@storybook/addon-links": "^5.3.17",
"@storybook/addon-notes": "^5.3.17",
"@storybook/addons": "^5.3.17",
"@storybook/angular": "^5.3.17",
"sass-loader": "^7.1.0",
"@angular/animations": "~8.2.5",
"@angular/common": "~8.2.5",
"@angular/compiler": "~8.2.5",
"@angular/core": "~8.2.5",
"@angular/forms": "~8.2.5",
"@angular/platform-browser": "~8.2.5",
"@angular/platform-browser-dynamic": "~8.2.5",
"@angular/platform-server": "~8.2.5",
"@angular/router": "~8.2.5",
"@angular/service-worker": "~8.2.5",
There are no similar issues according to goole :) any idea?
just add the follow line in "typings.d.ts" that can be found inside the .storybook directory
declare module '@storybook/angular/demo'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With