how to track down root cause of "could not read TS file" error from nx g @nx/angular:stories
?
#30800
Replies: 1 comment
-
I never figured out exactly what caused this error, but I suspect it was something in the project.json file that the storybook generator didn't like. I renamed this library, created a new one with the same name, imported all the components from the old one, and went through the storybook config process. Story files now generate as expected. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Running
nx g @nx/angular:stories my-lib
in my monorepo throws an error:The library builds with no errors. The component itself is fine:
MyComponent
here is lexicographically the first, so it gets picked up by the schematic first; it's not able to read any component..storybook/main.ts in case it matters
I attempted to build a minimal reproduction of the error, but ended up being unable to reproduce it. It only happens in my monorepo, which suggests a configuration error or something in conflict. I am bashing my head against the wall attempting to figure out what the could possibly be. Any suggestions for where to look would be most welcome.
Angular 19.2.8
nx 20.8.0
@nx/storybook 20.8.0
Beta Was this translation helpful? Give feedback.
All reactions