angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

ng build —aot Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory'

Open oshri opened this issue 9 years ago • 5 comments

###OS? macOS Sierra x64

Versions.

@angular/cli: 1.1.3 node: 6.10.0 os: darwin x64 @angular/animations: 4.4.3 @angular/common: 4.4.3 @angular/compiler: 4.4.3 @angular/core: 4.4.3 @angular/forms: 4.4.3 @angular/http: 4.4.3 @angular/platform-browser: 4.4.3 @angular/platform-browser-dynamic: 4.4.3 @angular/router: 4.4.3 @angular/cli: 1.1.3 @angular/compiler-cli: 4.4.3 @angular/language-service: 4.4.3

Repro steps.

App started using angular cli

The log given by the failure.

This is from my command line: ERROR in ./src/main.ts Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '/Users/ok13067/projects/test-aot/src' @ ./src/main.ts 3:0-74 @ multi ./src/main.ts

Desired functionality.

build --aot

oshri avatar Sep 27 '17 08:09 oshri

Heya, can you provide a repro we can follow to see this error? You're also using a very old version of the CLI, I suggest you upgrade.

filipesilva avatar Sep 27 '17 11:09 filipesilva

Updating to @angular-cli: 1.2.4 fixed the issue for me. Change your package.json to zone.js: 0.8.14. Delete node_modules folder and run npm install again.

abelkbil avatar Sep 27 '17 11:09 abelkbil

Thanks, @filipesilva & @abelkbil it works like a magic now!!

oshri avatar Sep 27 '17 12:09 oshri

update npm install [email protected] for me it's working fine

nandhuems avatar Dec 12 '17 13:12 nandhuems

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.