AoT with typescript@2.1.1 fails
See original GitHub issueI’m submitting a … (check one with “x”)
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
When compiling project with ngc and typescript@2.1.1 compilation fails with:
Metadata emit requires the sourceFiles are passed to WriteFileCallback. Update to TypeScript ^1.9.0-dev
When downgrading typescript to 2.0.10 the compilation is successful.
Expected behavior ngc should compile project with typescript@2.1.1.
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Please tell us about your environment: macOS@10.12.1 node@v6.9.1 angular@2.2.1 typescript@2.1.1
- Angular version: 2.0.X
Yes.
- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
-
Language: [all | TypeScript X.X | ES6/7 | ES5] TypeScript 2.1.1
-
Node (for AoT issues):
node --version
=
Issue Analytics
- State:
- Created 7 years ago
- Reactions:20
- Comments:13 (4 by maintainers)
Top Results From Across the Web
Angular 5 AOT compilation failed - typescript - Stack Overflow
The question is why my app only works properly when I don't use AOT feature? Why is this so strange? What should I...
Read more >Eren Failed to Transform - Attack on Titan Epic ... - YouTube
After Eren joined Levi's Squad he tries to get transformed but fails miserably. While four-eyes Hange is a little bit excited to see...
Read more >Why Kabaneri FAILS as an Attack on Titan Clone - YouTube
You guys asked for a review. I guess this is kinda one, but not in the same way that I used to do...
Read more >Top 20 Attack on Titan Moments - YouTube
They're the scenes that made this anime legendary. Join Ashley as he counts down the best moments across the Attack on Titan franchise, ......
Read more >EREN FAILED - Attack on Titan's Chapter 139 EXTRA PAGES ...
Attack on Titan Ending & Final Chapter 139 has now released extra pages for the final volume 34, We explain everything about Eren...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I did a little debugging on rubber-duck’s problem. One of the reasons seems to be line 187 in tsc-wrapped’s collector.js:
if (node.flags & ts.NodeFlags.Export) {
Here, ts.NodeFlags.Export is undefined in Typescript 2.1.This corresponds to the line in the source.
In my case running ngc does not fail with an error but the output directory only contains AoT files for node_modules.
Using the typescript 2.0.x produces correct/expected output.
You can check out the project here - do
npm run ngc
and it will create correct output in thebuild/aot
folder, upgrade to typescript 2.1.x and retry and you will only seebuild/aot/node_modules
.I would really like to get babel out of my build process and TS 2.1 finally implements ES5 async/await emit but this is a blocking issue before upgrading (I’ve also seen closed issues reporting the same problem without a solution eg. #11689)