Skip to content

ERROR in ./src/main.ts Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'C:\temp\foobar\src' @ ./src/main.ts 3:0-74 @ multi ./src/main.ts #7122

@Tohnmeister

Description

@Tohnmeister

Bug Report or Feature Request (mark with an x)

- [X] bug report
- [ ] feature request

Versions.

@angular/cli: 1.2.3
node: 6.10.2
os: win32 x64
@angular/animations: 4.3.1
@angular/common: 4.3.1
@angular/compiler: 4.3.1
@angular/core: 4.3.1
@angular/forms: 4.3.1
@angular/http: 4.3.1
@angular/platform-browser: 4.3.1
@angular/platform-browser-dynamic: 4.3.1
@angular/router: 4.3.1
@angular/cli: 1.2.3
@angular/compiler-cli: 4.3.1
@angular/language-service: 4.3.1

Repro steps.

npm install @angular/cli -g
ng new foobar
cd foobar
npm install
ng build --prod

The log given by the failure.

C:\temp\foobar>ng build --prod
Hash: fbb89132e330aaa03dd9
Time: 7068ms
chunk {0} polyfills.1553fdd8173a081c720c.bundle.js (polyfills) 177 kB {4} [initial] [rendered]
chunk {1} main.c22b61509cde9fcee2d3.bundle.js (main) 1.1 kB {3} [initial] [rendered]
chunk {2} styles.d41d8cd98f00b204e980.bundle.css (styles) 69 bytes {4} [initial] [rendered]
chunk {3} vendor.f7457d5ac1e9743fd76f.bundle.js (vendor) 849 kB [initial] [rendered]
chunk {4} inline.3a7e7a530cd68edb2099.bundle.js (inline) 0 bytes [entry] [rendered]

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'C:\temp\foobar\src'
@ ./src/main.ts 3:0-74
@ multi ./src/main.ts

Desired functionality.

A simple production build of a generated application. I noticed that after updating to the latest angular/cli version, I'm constantly getting this error (on all existing and all new projects).

Mention any other details that might be useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions