I am a beginner in Angular. Using version 8. I am trying to open my first project using this command in the CLI: ng serve --open
. The browser did not open and I got the following error in the console:
chunk {main} main.js, main.js.map (main) 60.6 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 140 kB [initial] [r
endered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.15 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 10.1 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 2.97 MB [initial] [rendered]
Date: 2020-02-11T07:41:32.593Z - Hash: 89ab0523139e13e9da30 - Time: 20437ms
** Angular Live Development Server is listening on localhost:4200, open your bro
wser on http://localhost:4200/ **
: Compiled successfully.
events.js:200
throw er; // Unhandled 'error' event
^
Error: spawn cmd ENOENT
←[90m at Process.ChildProcess._handle.onexit (internal/child_process.js:264:1
9)←[39m
←[90m at onErrorNT (internal/child_process.js:456:16)←[39m
←[90m at processTicksAndRejections (internal/process/task_queues.js:81:21)←[3
9m
Emitted 'error' event on ChildProcess instance at:
←[90m at Process.ChildProcess._handle.onexit (internal/child_process.js:270:1
2)←[39m
←[90m at onErrorNT (internal/child_process.js:456:16)←[39m
←[90m at processTicksAndRejections (internal/process/task_queues.js:81:21)←[3
9m {
errno: ←[32m'ENOENT'←[39m,
code: ←[32m'ENOENT'←[39m,
syscall: ←[32m'spawn cmd'←[39m,
path: ←[32m'cmd'←[39m,
spawnargs: [ ←[32m'/s'←[39m, ←[32m'/c'←[39m, ←[32m'start'←[39m, ←[32m'""'←[39m
, ←[32m'/b'←[39m, ←[32m'"http://localhost:4200/"'←[39m ]
}
how could I fix this problem?