change rootDir to ./src cause trouble for storybook custom `/.storybook/config.ts` with require.context (Storybook <5.3)
See original GitHub issueCurrent Behavior
after receiving the warning to tell me changge the rootDir to ./src, the stroybook does not work no longer.
ERROR in /Users/bytedance/workspace/use-pick-files/tsconfig.json
[tsl] ERROR
TS6059: File '/Users/bytedance/workspace/use-pick-files/.storybook/config.ts' is not under 'rootDir' '/Users/bytedance/workspace/use-pick-files/src'. 'rootDir' is expected to contain all source files.
ERROR in /Users/bytedance/workspace/use-pick-files/tsconfig.json
[tsl] ERROR
TS6059: File '/Users/bytedance/workspace/use-pick-files/stories/use-pick-files.stories.tsx' is not under 'rootDir' '/Users/bytedance/workspace/use-pick-files/src'. 'rootDir' is expected to contain all source files.
Expected behavior
storybook works after changing the rootDir
Suggested solution(s)
Additional context
Your environment
Software | Version(s) |
---|---|
TSDX | 0.13.0 |
TypeScript | 3.8.3 |
Browser | chrome |
npm/Yarn | yarn 1.21.1 |
Node | 12.14.1 |
Operating System | mac os |
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Configure Storybook
Configure Storybook. Storybook is configured via a folder called .storybook , which contains various configuration files. Note that you can change the folder ......
Read more >TypeScript Config - Storybook
Setting up TypeScript to work with Storybook We first have to use the custom Webpack config in full control mode, extending default configs...
Read more >Error after upgrading TypeScript (3->4) and Storybook (5->6)
After upgrading TypeScript from 3.9.6 to 4.4.4 and Storybook from 5.3.19 to 6.5.10, I'm getting the following error in several files:
Read more >err_ossl_evp_unsupported storybook - You.com | The AI ...
Finally, if you are unable to change the Webpack configuration (e.g., if it's a transitive ... yarn create vite // react-ts npx sb...
Read more >Using Vite for Bandler in Storybook | miyauci.me
It shows you how to develop Storybook with Vite. Explains in detail the points where you can get stuck in a preact project....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@agilgur5 thanks for help this is the original repo
@agilgur5 confirmed, workaround works well! this may be integrated into the template of
react with storybook
, to avoid having to search the issue for new projects.