Skip to content

Library with Typescript files fails to compile in AOT #6228

Closed
@localyost3000

Description

@localyost3000
- [x] bug report
- [ ] feature request

Versions.

node v6.10.0
npm v3.10.10
Windows 10

Repro steps.

We have a shared component library in our node_modules. We use some, but not all, of the components in our actual app. In some cases, we use a component which has another component's selector string in its template, while overriding the component referenced. When we run AoT, the errors claim that the overridden component can not be found. However, the path logged is incorrect, which is probably why it cannot be found.

eg.
node_modules/@shared/angular/components/demo/template.html is <other-component><other-component>
src/components/other/component.ts has some customized code

If we run AoT through @ngtools/webpack we get something like this:

ERROR in C:/Repos/OURAPP/client/$$_gendir/node_modules/@shared/angular/components/demo/component.ngfactory.ts (29,27): Cannot find module '../../../../../../$_gendir/src/components/other/component.ngfactory'.

Desired functionality.

I'd expect it to resolve to the correct file. removing the $$_gendir from the second path makes it point to the correct file, so clearly there's just a path resolution error somewhere.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions