Skip to content

Show error when compiling external modules with -out or -outFile option #6514

Closed

Description

@Roaders

See this issue:

http://stackoverflow.com/questions/34816304/why-does-adding-this-require-import-stop-node-js-outputing-to-the-console/34826050#34826050

This took me ages to get to the bottom of. no error messages to indicate I was doing something stupid just no output at all in the js file.
Suggest that an error message is displayed when we are compiling external modules with an invalid option like --out or --outFile

Activity

  1. DanielRosenwasser commented on Jan 16, 2016

    @DanielRosenwasser
    Member

    Hey, sorry about the frustration. Instead of giving an error, we decided to do the "right" thing. #5090 should fix this which you'll see in TypeScript 1.8.

    Can you give the nightlies a try and let us know how it works out? Just run npm install -g typescript@next.

  2. basarat commented on Jan 18, 2016

    @basarat
    Contributor

    The user is using commonjs based on the stackoverflow tsconfig. Hence it will still not work (#5090 (comment)) and maybe should give an error 🌹

  3. Roaders commented on Jan 18, 2016

    @Roaders
    Author

    That works fine in the nightlie. I get a message:

    "Only 'amd' and 'system' modules are supported alongside --out"

    Many thanks

  4. locked and limited conversation to collaborators on Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already createdFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions