Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Roaders opened this issue Jan 16, 2016 · 3 comments
Closed
Labels
Duplicate An existing issue was already created Fixed A PR has been merged for this issue

Comments

@Roaders
Copy link

Roaders commented Jan 16, 2016

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

@DanielRosenwasser
Copy link
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.

@basarat
Copy link
Contributor

basarat commented Jan 18, 2016

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

@Roaders
Copy link
Author

Roaders commented Jan 18, 2016

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

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

Many thanks

@DanielRosenwasser DanielRosenwasser added Duplicate An existing issue was already created Fixed A PR has been merged for this issue labels Jan 18, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

3 participants