Skip to content
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

Angular's Ahead-of-Time Compilation: ngCompiler.ReflectorHost is not a constructor #3607

Closed
ghost opened this issue Dec 16, 2016 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 16, 2016

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Mac OS X El Capitan

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

angular-cli: 1.0.0-beta.21
node: 7.2.1
os: darwin x64

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

There is an angular app which is levarging offline compilation with Ahead-of-Time Compilation.

This app was created using v1.0.0-beta.16 of the CLI

When running ng build --prod --aot the following error occurs:

The log given by the failure.

Normally this include a stack trace and some more information.

ngCompiler.ReflectorHost is not a constructor
TypeError: ngCompiler.ReflectorHost is not a constructor
at AotPlugin._setupOptions (/Users/DavidJohansson/Downloads/patient-portal-demo-frontend-production-build-1d9a3dcb5e586c71b7f690cce50afe2c1a4ddabd/node_modules/@ngtools/webpack/src/plugin.js:136:31)
at new AotPlugin (/Users/DavidJohansson/Downloads/patient-portal-demo-frontend-production-build-1d9a3dcb5e586c71b7f690cce50afe2c1a4ddabd/node_modules/@ngtools/webpack/src/plugin.js:37:14)
at Object.exports.getWebpackAotConfigPartial (/Users/DavidJohansson/Downloads/patient-portal-demo-frontend-production-build-1d9a3dcb5e586c71b7f690cce50afe2c1a4ddabd/node_modules/angular-cli/models/webpack-build-typescript.js:57:13)
at new NgCliWebpackConfig (/Users/DavidJohansson/Downloads/patient-portal-demo-frontend-production-build-1d9a3dcb5e586c71b7f690cce50afe2c1a4ddabd/node_modules/angular-cli/models/webpack-config.js:19:42)
at Class.run (/Users/DavidJohansson/Downloads/patient-portal-demo-frontend-production-build-1d9a3dcb5e586c71b7f690cce50afe2c1a4ddabd/node_modules/angular-cli/tasks/build-webpack.js:17:22)
at Class.run (/Users/DavidJohansson/Downloads/patient-portal-demo-frontend-production-build-1d9a3dcb5e586c71b7f690cce50afe2c1a4ddabd/node_modules/angular-cli/commands/build.js:51:26)
at Class. (/Users/DavidJohansson/Downloads/patient-portal-demo-frontend-production-build-1d9a3dcb5e586c71b7f690cce50afe2c1a4ddabd/node_modules/angular-cli/angular-cli/lib/models/command.js:152:17)
at process._tickCallback (internal/process/next_tick.js:103:7)

Mention any other details that might be useful.

I've followed the suggestions on the Github Issue Error: ngCompiler.ReflectorHost is not a constructor #3241 as well as Using Angular 2.3.0 with Latest CLI - Serve/Build Fails #3467.

I've also upgraded the @angular/* libraries to 2.3.0 and unfortunately, the issue is still persisting.


Thanks! We'll be in touch soon.

@hansl
Copy link
Contributor

hansl commented Dec 16, 2016

Right now Beta 22 and lower are not compatible with Angular 2.3. We're fixing that as part of the next beta release.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant