"Import type" stopped working in "@nrwl/react": "14.7.6" for storybook
See original GitHub issueCurrent Behavior
After updating to “@nrwl/react”: “14.7.6” from “@nrwl/react”: “14.7.5” and trying to run storybook I started to get an error in “import type” smth.
Expected Behavior
Storybook runs as normal, no errors. It is regression
Steps to Reproduce
- use import type in some storybook file
- update @nrwl/react from 14.7.5 to 14.7.6 (14.7.9 still broken)
- start storybook
- get this error specified in failure logs
example repo https://github.com/artra/nx-storybook-error
nx serve smth:storybook
to reproduce
Failure Logs
Unexpected token, expected "from" (9:12)
7 | var __LOCATIONS_MAP__ = {"AccountDetailsStory":{"startLoc":{"col":64,"line":11},"endLoc":{"col":102,"line":11},"startBody":{"col":64,"line":11},"endBody":{"col":102,"line":11}}};
8 |
> 9 | import type { Story, Meta } from '@storybook/react';
Environment
Storybook
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:23 (16 by maintainers)
Top Results From Across the Web
Can't import module with typescript alias in storybook for react ...
I'm creating a mobile app with TypeScript , React Native , and Storybook . A storybook code can import another component something like ......
Read more >@nrwl/next: Versions | Openbase
misc: do not exit after running graph (#12189) (3bf3a55) ... angular: add types to the generated tailwind configuration (#12018) (730d323) ... 14.7.6-beta.7.
Read more >nx - bytemeta
nx not working after nx reset (NX Daemon process terminated and closed the ... "Import type" stopped working in "@nrwl/react": "14.7.6" for storybook....
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
I’m looking into this today, if I don’t figure it out let’s open another bug. I’ve narrowed down the problem, the title does not depict it correctly!
@mandarini I’m facing the same issue and I can’t remove
@nrwl/react/plugins/storybook
from the addons because when I do it all my imports declared in my tsconfig files stop working (egModule not found: Error: Can't resolve '@front/components/inputs' ...
)