Repository navigation
Closed
Description
Please provide us with the following information:
OS?
Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Ubuntu 16.10
Versions.
Please run
ng --version. If there's nothing outputted, please run in a Terminal:node --versionand paste the result here:
$ ng -v
angular-cli: 1.0.0-beta.24
node: 6.8.0
os: linux x64
@angular/common: 2.3.1
@angular/compiler: 2.3.1
@angular/core: 2.3.1
@angular/forms: 2.3.1
@angular/http: 2.3.1
@angular/material: 2.0.0-alpha.11-3
@angular/platform-browser: 2.3.1
@angular/platform-browser-dynamic: 2.3.1
@angular/router: 3.3.1
@angular/compiler-cli: 2.3.1
(I did also try with 2.2.4 but I get This version of CLI is only compatible with angular version 2.3.1 or better and with 2.4.0 but it's not working either).
Repro steps.
Was this an app that wasn't created using the CLI? What change did you do on your code? etc.
Upgrade an app to beta-24
ng serve
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 (/home/maxime/Documents/petals-cockpit/frontend/node_modules/@ngtools/webpack/src/plugin.js:127:31)
at new AotPlugin (/home/maxime/Documents/petals-cockpit/frontend/node_modules/@ngtools/webpack/src/plugin.js:35:14)
at Object.exports.getWebpackNonAotConfigPartial (/home/maxime/Documents/petals-cockpit/frontend/node_modules/angular-cli/models/webpack-build-typescript.js:20:13)
at new NgCliWebpackConfig (/home/maxime/Documents/petals-cockpit/frontend/node_modules/angular-cli/models/webpack-config.js:26:42)
at Class.run (/home/maxime/Documents/petals-cockpit/frontend/node_modules/angular-cli/tasks/serve-webpack.js:20:22)
at /home/maxime/Documents/petals-cockpit/frontend/node_modules/angular-cli/commands/serve.js:108:26
at process._tickCallback (internal/process/next_tick.js:103:7)
Mention any other details that might be useful.
As #3607, #3587 are now closed, I decided to open a new issue because it was supposed to be fixed in beta-24.
(at least, I presume you were talking about beta-24 @hansl)

Reacted by Anton Moiseev
Metadata
Metadata
Assignees
Labels
No labels
Activity
intellix commentedon Dec 21, 2016
Same. Perhaps it would be good to report the version of TypeScript as well. I've a feeling I'm going to get asked what it is
intellix commentedon Dec 21, 2016
ok, so I was told to try following the upgrade options specified in README.md... afterwards it now works.
How can everything work now with the exact same versions as above?
I'm starting to think that angular-cli should ship with a yarn.lock to ensure dependencies are exactly the same regardless of cache on every machine
maxime1992 commentedon Dec 21, 2016
You're totally right for Typescript. I'm using
Typescript 2.1.4.Having a yarn.lock would be good but in case of conflicts with users when upgrading, might be more complicated, what do you think ?
alexciesielski commentedon Dec 21, 2016
Same issue with beta.24
$ ng serveNOTE
I am using an older version of @angular/router because of the 'Routers instantiated twice' bug, but I've also tried running
ng servewith the latest version and that is not the issue.Update:
Setting local version of cli back to beta.22-1 (global still 24) resolves the above error and products another one/hangs on the following lines at 21%:
dojchek commentedon Dec 21, 2016
It stops on 21% for me as well. I have the exact same setting as you.
This is because the beta.22-1 is not compatible with angular 2.3.0+
So, for now I'm downgrading back to angular 2.2.3 (router 3.2.3) and angular-cli beta.22-1
maxime1992 commentedon Dec 21, 2016
@dojchek we're talking about beta-24 here and look what I wrote in the topic :
So with beta-24, we just can't downgrade to 2.2.3
dojchek commentedon Dec 21, 2016
@maxime1992
Yes, I know - Just wanted to share my troubles, since I ran into the same issue. Ended up spending half a day trying to get it work and eventually downgraded until this gets fixed..
wesleycho commentedon Dec 21, 2016
This is basically an issue with Angular 2.3+ and
@ngtools/webpackI believe. This is fixed in the latest releases I believe.alexbyk commentedon Dec 23, 2016
+1
filipesilva commentedon Dec 30, 2016
Seems to be fixed in latest now.
See #3426 (comment) regarding TS2.1 compatibility.
angular-automatic-lock-bot commentedon Sep 6, 2019
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.