-
Notifications
You must be signed in to change notification settings - Fork 26.4k
Closed
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimefreq3: highhotlist: components teamRelated to Angular CDK or Angular MaterialRelated to Angular CDK or Angular Materialtype: bug/fix
Description
What's happening
Attempting to AoT compile an application that consumes the @angular/material
components. The ngfactory files are generated from the .ts
sources for the app and from the .d.ts
and .metadata.json
files in the material package.
The problem is that the ngfactories generated from the .ts
sources are attempting to import the ngfactories for the material components from where the .d.ts
files live and not from where the tool itself outputted the ngfactories for the material components (inside the specified genDir
).
Steps to reproduce:
- Clone https://github.com/jelbourn/material2/tree/aot-cli
npm install
gulp build:release
(creates the@angular/material
release output indist/
)./node_modules/.bin/ngc -p ./src/e2e-app/
(runsngc
on the e2e test app)./node_modules/.bin/tsc -p ./src/e2e-app/
Errors you should see:
src/e2e-app/aot/button/button-e2e.ngfactory.ts(20,27): error TS2307: Cannot find module '../../../../dist/@angular/material/button/button.ngfactory'.
src/e2e-app/aot/button/button-e2e.ngfactory.ts(22,27): error TS2307: Cannot find module '../../../../dist/@angular/material/icon/icon.ngfactory'.
src/e2e-app/aot/dist/@angular/material/button-toggle/button-toggle.ngfactory.ts(8,26): error TS2307: Cannot find module './button-toggle'.
src/e2e-app/aot/dist/@angular/material/button-toggle/button-toggle.ngfactory.ts(20,27): error TS2307: Cannot find module '../core/coordination/unique-selection-dispatcher'.
src/e2e-app/aot/dist/@angular/material/button/button.ngfactory.ts(8,26): error TS2307: Cannot find module './button'.
...
Node version is 6.3.1, compiler-cli version is 0.6.4
drew-moore, jianliao and cgatian
Metadata
Metadata
Assignees
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimefreq3: highhotlist: components teamRelated to Angular CDK or Angular MaterialRelated to Angular CDK or Angular Materialtype: bug/fix