-
Notifications
You must be signed in to change notification settings - Fork 12k
--aot build error: ERROR in ./src/main.ts Module not found #4239
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
Comments
Can you please provide the source for the app module? Or even better a small project that shows this problem happening? Also, do you have the same issue if you use NPM 6.x? Thanks a lot. |
Just finished fixing one of these...In my case, someone had copied one component to another folder (in a different module). So, I've ended with: Interestingly, the error msg said that /drivers/driver.component.ts wasn't associated to any module (instead of /user/drivers,component.ts)... |
If you can provide us with a repo we can look at, we might be able to help. The error by itself doesn't tell me much though. |
I have deleted my existing module from angular js 2 then it will be raise this kind of error. |
Ok. I got the solutions please restart your app. if you delete any existing module in your app. |
Thank you for your wonderful responses and fixes. In NG4 beta+ && Node 7+. aot runs splendidly including lazily-loaded modules. The performance is phenomenal (see below for versions used). Can't image how much better it can get when I top it up with Service workers and Universal.
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Issue Description
$ng serve with build param --aot has error:
However, build is successful using plain ng serve or ng serve --prod.
OS?
Mac OSX Sierra
Versions.
angular-cli: 1.0.0-beta.26
node: 7.2.1
os: darwin x64
@angular/common: 2.4.4
@angular/compiler: 2.4.4
@angular/core: 2.4.4
@angular/forms: 2.4.4
@angular/http: 2.4.4
@angular/platform-browser: 2.4.4
@angular/platform-browser-dynamic: 2.4.4
@angular/router: 3.4.4
@angular/compiler-cli: 2.4.4
Repro steps.
N.A. default Angular-cli
The log given by the failure.
The text was updated successfully, but these errors were encountered: