Skip to content

Silent error on imported type errors #527

@aaronbiser

Description

@aaronbiser

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.ts
Screen Shot 2020-03-02 at 10 42 47 AM

If I comment out IconProps then types.d.ts is generated.
Screen Shot 2020-03-02 at 10 43 18 AM

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.

Screen Shot 2020-03-02 at 11 06 07 AM

Screen Shot 2020-03-02 at 10 44 25 AM

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

Software Version(s)
TSDX 0.12.3
TypeScript 3.8.2
Browser Opera 66.0.3515.115
npm/Yarn 1.19.1
Node v10.15.3
Operating System macOS 10.15.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: bugSomething isn't workingproblem: no reproNo reproduction was provided (and have not tried to repro without one)problem: staleIssue has not been responded to in some timescope: upstreamIssue in upstream dependencytopic: rollup-plugin-typescript2Issues and PRs relating to rpts2

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions