Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.
This repository was archived by the owner on Feb 19, 2020. It is now read-only.

Silent fail during compiling ts files making Meteor not start up #75

@bvanderdrift

Description

@bvanderdrift

While working on multiple files, suddenly I got an error from meteor that relative .ts imports were failing.

Error: Cannot find module './Foo.ts'

I had seen no errors appear during the build of the app which made me question what happened. Also using METEOR_DEBUG_BUILD=1 showed no errors, and gave a success of the barbatus:typescript build step.

I used VCS to look at the created app.js file, and noticed that before the error the .ts files were compiled and after the error started showing the app.js file had no compiled .ts files anymore.

By trial and error I noticed I made a syntactic mistake (notice the ; in the constructor):

export default class Bar {
    a: string;
    b: string;

    constructor(a: string, b :string;){
        this.a = a;
        this.b = b;
    }
}

I guess this made barbatus:typescript fail and stop the compiling of .ts files. This is logical, but it was giving no feedback and even gave a success report, which made meteor happily build and then not be able to import .ts files.

I haven't diven into the barbatus:typescript package but I would suggest some kind of compile-error output.

Also want to take a moment to say that I think it's great that this package enables TypeScript for Meteor. Outside of this headache it has been a blast.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions