aot fails in ng4 project
Please provide us with the following information:
OS?
Ubuntu 16.04.2 LTS
Versions.
@angular/cli: 1.0.0-rc.0 node: 6.10.0 os: linux x64 @angular/common: 4.0.0-rc.2 @angular/compiler: 4.0.0-rc.2 @angular/core: 4.0.0-rc.2 @angular/forms: 4.0.0-rc.2 @angular/http: 4.0.0-rc.2 @angular/platform-browser: 4.0.0-rc.2 @angular/platform-browser-dynamic: 4.0.0-rc.2 @angular/router: 4.0.0-rc.2 @angular/cli: 1.0.0-rc.0 @angular/compiler-cli: 4.0.0-rc.2
Repro steps.
ng new yoshi --ng4 cd yoshi ng build --aot or ng serve --aot
The log given by the failure.
WARNING in ./src/$$_gendir/app/app.component.ngfactory.ts 11:37-66 "export 'ɵcreateRendererTypeV2' (imported as 'import1') was not found in '@angular/core'
WARNING in ./src/$$_gendir/app/app.component.ngfactory.ts 17:11-27 "export 'ɵviewDef' (imported as 'import1') was not found in '@angular/core'
WARNING in ./src/$$_gendir/app/app.component.ngfactory.ts 18:8-27 "export 'ɵelementDef' (imported as 'import1') was not found in '@angular/core'
WARNING in ./src/$$_gendir/app/app.component.ngfactory.ts 19:8-24 "export 'ɵtextDef' (imported as 'import1') was not found in '@angular/core'
WARNING in ./src/$$_gendir/app/app.component.ngfactory.ts 23:8-24 "export 'ɵtextDef' (imported as 'import1') was not found in '@angular/core'
WARNING in ./src/$$_gendir/app/app.component.ngfactory.ts 30:35-64 "export 'ɵcreateRendererTypeV2' (imported as 'import1') was not found in '@angular/core'
WARNING in ./src/$$_gendir/app/app.component.ngfactory.ts 36:11-27 "export 'ɵviewDef' (imported as 'import1') was not found in '@angular/core'
WARNING in ./src/$$_gendir/app/app.component.ngfactory.ts 37:8-27 "export 'ɵelementDef' (imported as 'import1') was not found in '@angular/core'
WARNING in ./src/$$_gendir/app/app.component.ngfactory.ts 38:8-29 "export 'ɵdirectiveDef' (imported as 'import1') was not found in '@angular/core'
WARNING in ./src/$$_gendir/app/app.component.ngfactory.ts 41:35-66 "export 'ɵcreateComponentFactory' (imported as 'import1') was not found in '@angular/core'
if you try to open in browser, it throws error
Uncaught TypeError: WEBPACK_IMPORTED_MODULE_1__angular_core.ɵcreateRendererTypeV2 is not a function at Object.104 (main.bundle.js:43) at webpack_require (inline.bundle.js:53) at Object.105 (main.bundle.js:88) at webpack_require (inline.bundle.js:53) at Object.99 (main.bundle.js:594) at webpack_require (inline.bundle.js:53) at Object.241 (main.bundle.js:567) at webpack_require (inline.bundle.js:53) at webpackJsonpCallback (inline.bundle.js:24) at main.bundle.js:1
Mention any other details that might be useful.
Thanks! We'll be in touch soon.
Can you please update to version 1.0.0-rc.1 of @angular/cli both locally and globally?
I just tested this locally and was unable to reproduce this issue.
I just clone this repo and npm link.
ng --version
@angular/cli: 1.0.0-rc.1
node: 6.10.0
os: linux x64
@angular/common: 4.0.0-rc.2
@angular/compiler: 4.0.0-rc.2
@angular/core: 4.0.0-rc.2
@angular/forms: 4.0.0-rc.2
@angular/http: 4.0.0-rc.2
@angular/platform-browser: 4.0.0-rc.2
@angular/platform-browser-dynamic: 4.0.0-rc.2
@angular/router: 4.0.0-rc.2
@angular/cli: 1.0.0-rc.1
@angular/compiler-cli: 4.0.0-rc.2
Repro step: ng new yoshi --ng4 cd yoshi ng build --aot
WARNING in ./src/$$_gendir/app/app.component.ngfactory.ts 11:37-66 "export 'ɵcreateRendererTypeV2' (imported as 'import1') was not found in '@angular/core'
WARNING in ./src/$$_gendir/app/app.component.ngfactory.ts 17:11-27 "export 'ɵviewDef' (imported as 'import1') was not found in '@angular/core'
WARNING in ./src/$$_gendir/app/app.component.ngfactory.ts 18:8-27 "export 'ɵelementDef' (imported as 'import1') was not found in '@angular/core'
WARNING in ./src/$$_gendir/app/app.component.ngfactory.ts 19:8-24 "export 'ɵtextDef' (imported as 'import1') was not found in '@angular/core'
WARNING in ./src/$$_gendir/app/app.component.ngfactory.ts 23:8-24 "export 'ɵtextDef' (imported as 'import1') was not found in '@angular/core'
WARNING in ./src/$$_gendir/app/app.component.ngfactory.ts 30:35-64 "export 'ɵcreateRendererTypeV2' (imported as 'import1') was not found in '@angular/core'
WARNING in ./src/$$_gendir/app/app.component.ngfactory.ts 36:11-27 "export 'ɵviewDef' (imported as 'import1') was not found in '@angular/core'
WARNING in ./src/$$_gendir/app/app.component.ngfactory.ts 37:8-27 "export 'ɵelementDef' (imported as 'import1') was not found in '@angular/core'
WARNING in ./src/$$_gendir/app/app.component.ngfactory.ts 38:8-29 "export 'ɵdirectiveDef' (imported as 'import1') was not found in '@angular/core'
WARNING in ./src/$$_gendir/app/app.component.ngfactory.ts 41:35-66 "export 'ɵcreateComponentFactory' (imported as 'import1') was not found in '@angular/core'
I use yarn to install packages.
I tried with both @angular/cli: 1.0.0-rc.0 and @angular/cli: 1.0.0-rc.1.
Using both package managers, yarn and npm
on same OS Ubuntu 16.04.2 LTS
node -v = 6.9.5
unable to reproduce error with these steps
ng new yoshi --ng4
cd yoshi
ng build --aot
or ng serve --aot
@icepeng you may have linked this library locally, but when you create a new project you need to link that local install to your linked version via:
npm link @angular/cli
which will allow your newly created project to use your locally cloned verison.
I tried with ng new yoshi --ng4 --link-cli but nothing different.
The node_modules path seems to have permissions problems. After I resolve the permissions issue, it works fine. Closing issue.
sorry but how did you solve this problem I have something similar WARNING in ./src/$$_gendir/app/bootstrap/app.module.ngfactory.ts 585:63-95 "export 'AuthenticationResolver' (imported as 'import184') was not found in '../../../app/bootstrap/app.routing'
Im using: @angular/cli: 1.0.0-rc.4 node: 7.4.0 os: linux x64 @angular/common: 2.4.10 @angular/compiler: 2.4.10 @angular/core: 2.4.10 @angular/forms: 2.4.10 @angular/http: 2.4.10 @angular/platform-browser: 2.4.10 @angular/platform-browser-dynamic: 2.4.10 @angular/router: 3.4.10 @angular/cli: 1.0.0-rc.4 @angular/compiler-cli: 2.4.10
I had permission problem with npm and yarn. I made mistake using 'npm link' and some weird errors happened. After I solved npm to make it work properly, this error was gone. Hope my answers will help.
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.