Error: ngCompiler.ReflectorHost is not a constructor
Please provide us with the following information:
OS?
Mac OSX (Sierra)
Versions.
ngtools/webpack - 1.1.7
Repro steps.
git clone github.com/prsolucoes/angular2-starter-project cd angular2-starter-project npm install npm start
The log given by the failure.
paulo@MacBook-Pro-de-Paulo:~/Developer/workspaces/node/angular2-starter-project (master) $ npm start
> [email protected] start /Users/paulo/Developer/workspaces/node/angular2-starter-project
> npm run ngc && concurrently -r "webpack-dev-server --config webpack.config.js" "node ./bin/ngc-watch.js"
> [email protected] ngc /Users/paulo/Developer/workspaces/node/angular2-starter-project
> ngc -p ./tsconfig.json
/Users/paulo/Developer/workspaces/node/angular2-starter-project/node_modules/@ngtools/webpack/src/plugin.js:127
this._reflectorHost = new ngCompiler.ReflectorHost(this._program, this._compilerHost, this._angularCompilerOptions);
^
TypeError: ngCompiler.ReflectorHost is not a constructor
at AotPlugin._setupOptions (/Users/paulo/Developer/workspaces/node/angular2-starter-project/node_modules/@ngtools/webpack/src/plugin.js:127:31)
at new AotPlugin (/Users/paulo/Developer/workspaces/node/angular2-starter-project/node_modules/@ngtools/webpack/src/plugin.js:35:14)
at Object.<anonymous> (/Users/paulo/Developer/workspaces/node/angular2-starter-project/webpack/plugins.js:12:2)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/paulo/Developer/workspaces/node/angular2-starter-project/webpack.config.js:15:11)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
Mention any other details that might be useful.
My repository with the current problem: https://github.com/prsolucoes/angular2-starter-project
My plugin initialization:
let ngtools = require('@ngtools/webpack');
module.exports = [
new ngtools.AotPlugin({
tsConfigPath: './tsconfig.json',
baseDir: path.join(process.cwd(), 'src'),
entryModule: path.join(process.cwd(), 'src', 'app', 'modules', 'app.module') + '#AppModule'
}),
....
Let me try that today too. I put my prj on hold because of these issues like 3 weeks ago. Let's hope it'll work...
Still does not work. This is ridiculous.
Was there a fix for this? I am experience this as well :(
That's fixed pretty long time ago. My suggestion is to create a new project with beta.26 (the current version as I write this).
I update all package to last version,the issuse fixed.
I use this package.json and fixed! "dependencies": { "@angular/common": "4.0.0", "@angular/compiler": "4.0.0", "@angular/compiler-cli": "4.0.0", "@angular/core": "4.0.0", "@angular/forms": "4.0.0", "@angular/http": "4.0.0", "@angular/platform-browser": "4.0.0", "@angular/platform-browser-dynamic": "4.0.0", "@ionic-native/core": "3.4.2", "@ionic-native/splash-screen": "3.4.2", "@ionic-native/status-bar": "3.4.2", "@ionic/storage": "2.0.1", "ionic-angular": "3.0.1", "ionicons": "3.0.0", "rxjs": "5.1.1", "sw-toolbox": "3.4.0", "zone.js": "^0.8.4", "@ionic-native/background-mode": "^3.4.4", "@ionic-native/geolocation": "^3.4.4", "@types/google-maps": "^3.2.0", "angularfire2": "^2.0.0-beta.7", "firebase": "^3.6.9", "geofire": "^4.1.2" }, "devDependencies": { "@ionic/app-scripts": "1.3.0", "typescript": "~2.2.1" }
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.