question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AoT with typescript@2.1.1 fails

See original GitHub issue

I’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:closed
  • Created 7 years ago
  • Reactions:20
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jimmytheneutrinocommented, Nov 24, 2016

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.

2reactions
rubber-duckcommented, Nov 18, 2016

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 the build/aot folder, upgrade to typescript 2.1.x and retry and you will only see build/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)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found