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

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

Open vadjs opened this issue 10 years ago • 31 comments

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.

vadjs avatar Oct 12 '16 13:10 vadjs

I have this problem with angular-cli: 1.0.0-beta.22-1 Same code worked fine with version 1.0.0-beta.19-3

EDIT: From comments on https://github.com/angular/angular-cli/issues/3157 I was over-eager and set typescript to 2.1.4. Downgrading TypeScript to 2.0.10 avoids the AppModule is not an NgModule error.

arlowhite avatar Dec 13 '16 20:12 arlowhite

My ng serve hanging went away after I updated /src/tsconfig.json to the one generated by beta.22

aaronleestic avatar Dec 13 '16 21:12 aaronleestic

the way i deal with it is I run ng build and see where is the error in the code actually

d668 avatar Dec 14 '16 08:12 d668

+1 20% building modules 84/84 modules 0 activewebpack: wait until bundle finished: What is the possible solution for this?

frank-mendez avatar Dec 14 '16 08:12 frank-mendez

From what I've seen here and on https://github.com/angular/angular-cli/issues/3157 and https://github.com/angular/angular-cli/issues/3426

Most problems seem to be caused by people jumping ahead to a newer version of Angular or TypeScript.

Double-check package.json For an angular-cli 1.0.0-beta.22-1 project, you should be on:

  • Angular 2.2.3 (@angular/* packages)
  • Don't forget "@angular/compiler-cli": "2.2.3" (under devDependencies)
  • @angular/router 3.2.3
  • typescript 2.0.10 (default version is ~2.0.3)

You should use ng init --skip-npm to diff your package.json with the default. Or create a fresh project somewhere else ng new --skip-npm fresh-ng-project and use your favorite diff tool to compare your package.json with the default.

After you've double-checked your package.json, npm install

If that doesn't fix it, some people have said changes they made to tsconfig.json caused the problem. So review that diff as well.

Otherwise, review how your module is exported. In my project, one module was export default class MyModule {} export default no longer works.

Remove default, if this is a lazy-loaded module in the router, you will need to add #MyModule loadChildren: 'app/path/to/my.module#MyModule'

arlowhite avatar Dec 14 '16 19:12 arlowhite

getting below error while running ng build command.

No errors Error: No errors at validate (/home/meghad/testingWorkspace/web/node_modules/extract-text-webpack-plugin/schema/validator.js:10:9) at Function.ExtractTextPlugin.extract (/home/meghad/testingWorkspace/web/node_modules/extract-text-webpack-plugin/index.js:188:3) at /home/meghad/testingWorkspace/web/node_modules/angular-cli/models/webpack-build-utils.js:72:77 at Array.map (native) at Object.makeCssLoaders (/home/meghad/testingWorkspace/web/node_modules/angular-cli/models/webpack-build-utils.js:69:53) at Object.getWebpackCommonConfig (/home/meghad/testingWorkspace/web/node_modules/angular-cli/models/webpack-build-common.js:77:65) at new NgCliWebpackConfig (/home/meghad/testingWorkspace/web/node_modules/angular-cli/models/webpack-config.js:22:49) at Class.exports.default.Task.extend.run (/home/meghad/testingWorkspace/web/node_modules/angular-cli/tasks/build-webpack.js:18:22) at Class.Command.extend.run (/home/meghad/testingWorkspace/web/node_modules/angular-cli/commands/build.js:60:26) at Class. (/home/meghad/testingWorkspace/web/node_modules/angular-cli/ember-cli/lib/models/command.js:152:17) at tryCatch (/home/meghad/testingWorkspace/web/node_modules/es6-promise/dist/es6-promise.js:410:12) at invokeCallback (/home/meghad/testingWorkspace/web/node_modules/es6-promise/dist/es6-promise.js:425:13) at /home/meghad/testingWorkspace/web/node_modules/es6-promise/dist/es6-promise.js:172:16 at flush (/home/meghad/testingWorkspace/web/node_modules/es6-promise/dist/es6-promise.js:121:5) at nextTickCallbackWith0Args (node.js:419:9) at process._tickCallback (node.js:348:13)

meghadureja avatar Jan 28 '17 13:01 meghadureja

getting same as meghadureja on ng build or ng serve

happens on windows and mac with prompts in administrator mode.

node: 6.9.4 npm: 3.10.10 angular-cli: 1.0.0-beta.26 angular: 2.4.5 router: 3.4.5

iamgmd avatar Jan 28 '17 13:01 iamgmd

@iamgmd

Hi there, you're after https://github.com/angular/angular-cli/issues/4264 for the current issue, with a working workaround in that thread.

equinox avatar Jan 28 '17 14:01 equinox

@equinox

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

iamgmd avatar Jan 28 '17 14:01 iamgmd

Closing this as fixed.

hansl avatar Feb 03 '17 20:02 hansl

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.