Silent error on imported type errors #527
Labels
kind: bug
Something isn't working
problem: no repro
No reproduction was provided (and have not tried to repro without one)
problem: stale
Issue has not been responded to in some time
scope: upstream
Issue in upstream dependency
topic: rollup-plugin-typescript2
Issues and PRs relating to rpts2
Thanks for creating/maintaining such a great library it's been nice to use but for one issue that I can't seem to resolve.
Current Behavior
If I import a type that has some error the dist files are "Compiled successfully" according to the terminal output but they are not generated in the
dist
directory. It seems that an error is being thrown that prevents the build because the file does not appear in the dist output but it is not exposed as an error in the terminal output.In the screenshot under
DivProps
there is a type being used that is not imported. When the output files are generated to 'dist' you can see that there isn't a file for types.tsIf I comment out
IconProps
thentypes.d.ts
is generated.If I move the type definitions to the component file instead of importing them I can see the error in the console output as expected. However, I can't move all the types into their respective component files because there will be many shared interfaces and types.
It's quite possible that I am completely missing something obvious here but after spending hours searching and trying to resolve the issue I thought I would submit an issue. 🙏
Expected behavior
That an error would be displayed in the terminal output when importing the types. I would expect the error to be the same as the error thrown when the types are added to the component file.
Suggested solution(s)
Checking to see if errors are being thrown but not surfaced to the console output
Additional context
Your environment
The text was updated successfully, but these errors were encountered: