angular-cli: No any error output when used `ng serve --aot` in project which has errors

Please provide us with the following information:

No any error output when used ng serve --aot in project which has errors(compilation fails).

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Linux(Ubuntu 16.04)

Versions.

Please run ng --version. If there’s nothing outputted, please run in a Terminal: node --version and paste the result here:

angular-cli: local (v1.0.0-beta.17, branch: master) node: 6.7.0 os: linux x64

Repro steps.

Was this an app that wasn’t created using the CLI? What change did you do on your code? etc.

The log given by the failure.

Normally this include a stack trace and some more information.

I getting this log with “infinite building”: ng serve --aot Could not start watchman; falling back to NodeWatcher for file system events. Visit http://ember-cli.com/user-guide/#watchman for more info. ** NG Live Development Server is running on http://localhost:4200. ** 23% building modules 109/109 modules 0 active But nothing of errors.

Mention any other details that might be useful.

With normal ng-serve project successfully builds but has intentional error which appears in browser console - not imported “angular2-text-mask” package(but it’s functionality used in template).

Thanks! We’ll be in touch soon.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 31 (5 by maintainers)

Most upvoted comments

I faced this as well.

ng serve --aot simply hangs at 20%.

ng build --aot showed me the problem.

AppModule is not an NgModule
Error: AppModule is not an NgModule

+1 and looks like the compiler-cli does not get the correct annotations of my app.module.ts

getNgModuleMetadata of StaticSymbol {
  filePath: '/Users/indooorsman/workspace/projects/web/yingke/server/ykly-toc-web/src/main/webapp/spa_src/src/app/app.module.ts',
  name: 'AppModule',
  members: undefined }
get annotations: []
Error: AppModule is not an NgModule
    at AotPlugin.getNgModuleMetadata (/Users/indooorsman/workspace/projects/web/yingke/server/ykly-toc-web/src/main/webapp/spa_src/node_modules/@ngtools/webpack/src/plugin.js:249:19)
    at AotPlugin._processNgModule (/Users/indooorsman/workspace/projects/web/yingke/server/ykly-toc-web/src/main/webapp/spa_src/node_modules/@ngtools/webpack/src/plugin.js:230:42)

@equinox

Thanks, just seen that after I posted. Thanks for redirect.

Same problem with 1.0.0-beta.21