Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jayakrishna-v opened this issue Dec 29, 2017 · 3 comments
Closed
Labels
needs: repro steps We cannot reproduce the issue with the information given

Comments

@jayakrishna-v
Copy link

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.

@filipesilva filipesilva self-assigned this Dec 29, 2017
@filipesilva filipesilva added the needs: repro steps We cannot reproduce the issue with the information given label Dec 29, 2017
@filipesilva
Copy link
Contributor

This seems like a bug but we'll need to look at a reproduction to find and fix the problem. Can you setup a minimal repro please?

You can read here why this is needed. A good way to make a minimal repro is to create a new app via ng new repro-app and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.

@jayakrishna-v
Copy link
Author

Hi @filipesilva, I tried this command on a new Angular app and it is working fine. I will try to reproduce this by adding the required code and let you know.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: repro steps We cannot reproduce the issue with the information given
Projects
None yet
Development

No branches or pull requests

2 participants