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

ng serve not working when install latest version of angular cli

Open tedrob opened this issue 9 years ago • 43 comments

Please provide us with the following information: windows 10

angular/cli: 1.0.0-beta.32.3 [1.0.0-beta.26] node: 6.9.5 os: win32 x64 @angular/cli: 1.0.0-beta.32.3

nothing just upgraded to the new version and started having all these problems also I get this error also can't find @angular/platform-browser-dynamic


OS?

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

Versions.

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

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.

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

tedrob avatar Feb 22 '17 01:02 tedrob

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ ** Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

  • configuration.entry should be one of these: object { : non-empty string | [non-empty string] } | non-empty string | [non-empty string] | function -> The entry point(s) of the compilation. Details:
    • configuration.entry['styles'] should be a string. -> The string is resolved to a module which is loaded upon startup.
    • configuration.entry['styles'] should not contain the item 'D:\sampark\src\styles.css' twice.
    • configuration.entry should be a string. -> An entry point without name. The string is resolved to a module which is loaded upon startup.
    • configuration.entry should be an array: [non-empty string]
    • configuration.entry should be an instance of function -> A Function returning an entry object, an entry string, an entry array or a promise to these things. WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
  • configuration.entry should be one of these: object { : non-empty string | [non-empty string] } | non-empty string | [non-empty string] | function -> The entry point(s) of the compilation. Details:
    • configuration.entry['styles'] should be a string. -> The string is resolved to a module which is loaded upon startup.
    • configuration.entry['styles'] should not contain the item 'D:\sampark\src\styles.css' twice.
    • configuration.entry should be a string. -> An entry point without name. The string is resolved to a module which is loaded upon startup.
    • configuration.entry should be an array: [non-empty string]
    • configuration.entry should be an instance of function -> A Function returning an entry object, an entry string, an entry array or a promise to these things. at webpack (D:\sampark\node_modules\webpack\lib\webpack.js:24:9) at Observable.rxjs_1.Observable.obs [as _subscribe] (D:\sampark\node_modules@angular-devkit\build-angular\src\dev-server\index.js:100:37) at Observable._trySubscribe (D:\sampark\node_modules\rxjs\internal\Observable.js:43:25) at Observable.subscribe (D:\sampark\node_modules\rxjs\internal\Observable.js:29:22) at D:\sampark\node_modules\rxjs\internal\util\subscribeTo.js:22:31 at Object.subscribeToResult (D:\sampark\node_modules\rxjs\internal\util\subscribeToResult.js:7:45) at MergeMapSubscriber._innerSub (D:\sampark\node_modules\rxjs\internal\operators\mergeMap.js:75:38) at MergeMapSubscriber._tryNext (D:\sampark\node_modules\rxjs\internal\operators\mergeMap.js:72:14) at MergeMapSubscriber._next (D:\sampark\node_modules\rxjs\internal\operators\mergeMap.js:55:18) at MergeMapSubscriber.Subscriber.next (D:\sampark\node_modules\rxjs\internal\Subscriber.js:64:18) at TapSubscriber._next (D:\sampark\node_modules\rxjs\internal\operators\tap.js:62:26) at TapSubscriber.Subscriber.next (D:\sampark\node_modules\rxjs\internal\Subscriber.js:64:18) at MergeMapSubscriber.notifyNext (D:\sampark\node_modules\rxjs\internal\operators\mergeMap.js:84:26) at InnerSubscriber._next (D:\sampark\node_modules\rxjs\internal\InnerSubscriber.js:25:21) at InnerSubscriber.Subscriber.next (D:\sampark\node_modules\rxjs\internal\Subscriber.js:64:18) at ForkJoinSubscriber.notifyComplete (D:\sampark\node_modules\rxjs\internal\observable\forkJoin.js:79:25)

what should i do?

kunj1234 avatar Jul 23 '18 12:07 kunj1234

The problem is totally different Angular CLI workspace configuration scheme.

For angular-cli 1.7.2 I had .angular-cli.json but for latest version like angular-cli 7, it is angular.json which can be found here : https://github.com/angular/angular-cli/wiki/angular-workspace

My suggestion, create a new project with angular-cli 7, and copy its angular.json to your project and run npm install to get latest angular-cli

sudheerkaushik avatar Dec 08 '18 17:12 sudheerkaushik

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.