Skip to content

Compiler crash when specifying outFile and declaration #24199

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
michaelaird opened this issue May 17, 2018 · 7 comments
Closed

Compiler crash when specifying outFile and declaration #24199

michaelaird opened this issue May 17, 2018 · 7 comments
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@michaelaird
Copy link

michaelaird commented May 17, 2018

TypeScript Version: 2.9.0-rc

Search Terms:

getFileReferenceForTypeName
emitSourceFileOrBundle
Cannot read property 'length' of undefined
outFile

Issue

Typescript compiler crashes when I specify an outFile

Expected behavior:

Build was successful in 2.7.2.

Actual behavior:

Build fails with the following stack trace:

\node_modules\typescript\lib\typescript.js:78638
throw e;
^
TypeError: Cannot read property 'length' of undefined
at getFileReferenceForTypeName (\node_modules\typescript\lib\typescript.js:71957:90)
at Object.mapDefined (\node_modules\typescript\lib\typescript.js:2157:30)
at getFileReferencesForUsedTypeReferences (\node_modules\typescript\lib\typescript.js:71953:52)
at transformRoot (\node_modules\typescript\lib\typescript.js:71919:50)
at \node_modules\typescript\lib\typescript.js:3063:42
at transformRoot (\node_modules\typescript\lib\typescript.js:72974:82)
at Object.map (\node_modules\typescript\lib\typescript.js:2010:29)
at Object.transformNodes (\node_modules\typescript\lib\typescript.js:72961:30)
at emitDeclarationFileOrBundle (\node_modules\typescript\lib\typescript.js:74089:43)
at emitSourceFileOrBundle (\node_modules\typescript\lib\typescript.js:74035:13)
The terminal process terminated with exit code: 1

I can share a repro project privately.

@mhegazy
Copy link
Contributor

mhegazy commented May 17, 2018

I can share a repro project privately.

Please do. my email is my github username at microsoft.

@mhegazy mhegazy added the Needs More Info The issue still hasn't been fully clarified label May 17, 2018
@michaelaird
Copy link
Author

Sent. Let me know if you don't receive it (I attached the repro as a zip file)

@mhegazy mhegazy added Bug A bug in TypeScript Fixed A PR has been merged for this issue and removed Needs More Info The issue still hasn't been fully clarified labels May 17, 2018
@mhegazy mhegazy self-assigned this May 17, 2018
@mhegazy mhegazy added this to the TypeScript 2.9.1 milestone May 17, 2018
@michaelaird michaelaird changed the title Compiler crash when specifying outFile Compiler crash when specifying outFile and declaration May 17, 2018
@mhegazy
Copy link
Contributor

mhegazy commented May 17, 2018

Thanks @michaelaird for sharing the repro. fix should be in the typescript@next tomorrow, and in [email protected].

@michaelaird
Copy link
Author

Amazing turn around! Thanks for the great work, I'm really looking forward to this release.

@mhegazy
Copy link
Contributor

mhegazy commented May 17, 2018

I should calrify, [email protected] will be available in two weeks.

@michaelaird
Copy link
Author

michaelaird commented May 17, 2018 via email

@mhegazy
Copy link
Contributor

mhegazy commented May 17, 2018

no, but there will be 2.9.1-insider drops coming out regularly.

@microsoft microsoft locked and limited conversation to collaborators Jul 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

2 participants