Skip to content

Module not found: Error: Can't resolve './app/app.module.ngfactory' #9022

Closed
@jayakrishna-v

Description

@jayakrishna-v

This is with reference to the issues #9016 & #7925

@filipesilva @jgodi @clydin @jinder

Versions

ng -v 1.5.4
node -v 6.11.2
npm -v 3.10.10

Thanks for the detailed explanation @jgodi and @clydin in #9016. I tried to run the command as mentioned but getting below error. Im trying to figure out this issue. I hope you are aware of this issue related to ngfactory. Your help in resolving this issue will be most appreciated.

ng build prod mode

I have referred to the closed issue #7925. My main.ts is already importing AppModule as mentioned by @jinder But still getting this error.

My main.ts looks as below:

import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
import 'hammerjs';

if (environment.production) {
enableProdMode();
}

platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.log(err));

Need your help in fixing this error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: repro stepsWe cannot reproduce the issue with the information given

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions