Skip to content

[AOT] @ngtools/webpack throws "Cannot find module './ngfactory/app/app.module.ngfactory'" #2586

@DzmitryShylovich

Description

@DzmitryShylovich

OS?

Windows_NT 10.0.10586

Description.

I'm trying to integrate @ngtools/webpack into my custom webpack build and is getting Cannot find module './ngfactory/app/app.module.ngfactory' error. The source of the error is here. I've managed to suppress the error by disabling this check.

Repro steps.

Github repo: https://github.com/DzmitryShylovich/ngtools-error

npm i
npm start

The log given by the failure.

ERROR in ./app/main.aot.ts
Module build failed: Error: D:/Workspace/ngtools-error/app/main.aot.ts (3,34): Cannot find module './ngfactory/app/app.module.ngfactory'.)
    at _transpile (D:\Workspace\ngtools-error\node_modules\@ngtools\webpack\src\loader.js:101:19)
    at D:\Workspace\ngtools-error\node_modules\@ngtools\webpack\src\loader.js:125:26

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Impacts a large percentage of users; if a workaround exists it is partial or overly painfultype: bug/fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions