-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Import type" stopped working in "@nrwl/react": "14.7.6" for storybook #12186
Comments
Hi there! Thanks for filing an issue! :)
You can try also the following, to observe the changes in configuration:
|
I will make a fix so that when you generate configuration and it detects Here's my repository showing that it all works as expected. |
Hello @mandarini, thanks for your help,
|
@artra I'm sorry, I literally just cloned your repo, I ran Here's my output: https://app.warp.dev/block/XN7X6yANisXukRkx9olvxD What operating system are you using? What node version? Can I see your |
Also, can you please do the following and let me know if it works? It will help me understand: Generate a new Nextjs app, and then add Storybook to it ( |
@mandarini I'm facing the same issue and I can't remove |
Hey @mandarini looks like I fixed my example repository and it works. look like similar to what @Tirke says here ModuleNotFoundError: Module not found: Error: Can't resolve '@new2/storybook' in '/Users/alexey.artemev/Projects/nx-storybook-error/new2/apps/smth/components/test-component' |
Hi there @artra ! I see in your case you are creating a story for a component that lives in another library. Storybook suggests that you put stories next to the components they are for. So I think it makes sense in that case to not work. I do understand the issue you are highlighting (and @Tirke too), that the imports from other libraries within the workspace is not working properly for that Storybook instance. I will look into it. However, I still think that the "philosophy" behind Storybook and writing stories is having things containerised, for that exact reason... To be able to function independently. |
@Tirke can I see what your |
The fact that it works in |
Ok, hold on we have quite a beast of a monorepo. For us storybook is living inside a lib we called Inside
With also have a
Now the tsconfig chain starting from the one in
It references
Referencing
Referencing the root one
|
So, @Tirke , the library on which you are using |
I am trying to understand the issue.
|
In your case @Tirke which imports break? |
@mandarini We are using nestjs as our frontend framework in our monorepo. When I updated nx and all the packages (including Then I found this issue went on and removed
==>
I'm having imports errors
If I switch imports to relative ones it's removing the issue but I can't update all the imports because a lot of code is impacted. |
Ok, got it. Looking into it. @Tirke Thank you very very much for all the details |
@mandarini Thanks for answering so quickly :) |
Hehe don't thank me too soon, let's see if and when I'll figure this out! 😅 |
@mandarini Should this be reopened or there is another bug already? |
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! |
Here's a reproduction repository for reference |
Linking the |
Issue #12320 explains the problem more accurately: |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current 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
example repo https://github.com/artra/nx-storybook-error
nx serve smth:storybook
to reproduceFailure Logs
Environment
Storybook
The text was updated successfully, but these errors were encountered: