问题描述
在刚创建的Angular项目中,当我运行命令: ng serve --open
** Angular Live Development Server is listening on localhost:4200,open your browser on http://localhost:4200/ **
: Compiled successfully.
(node:9388) UnhandledPromiseRejectionWarning: Error: spawn EPERM
at ChildProcess.spawn (internal/child_process.js:406:11)
at Object.spawn (child_process.js:548:9)
at module.exports (C:\Users\JayMoh\Desktop\Developer\Angular\todos\node_modules\open\index.js:137:34)
at MapSubscriber.project (C:\Users\JayMoh\Desktop\Developer\Angular\todos\node_modules\@angular-devkit\build-angular\src\dev-server\index.js:187:21)
at MapSubscriber._next (C:\Users\JayMoh\Desktop\Developer\Angular\todos\node_modules\@angular-devkit\build-angular\node_modules\rxjs\internal\operators\map.js:49:35)
at MapSubscriber.Subscriber.next (C:\Users\JayMoh\Desktop\Developer\Angular\todos\node_modules\@angular-devkit\build-angular\node_modules\rxjs\internal\Subscriber.js:66:18)
at SafeSubscriber.__tryOrUnsub (C:\Users\JayMoh\Desktop\Developer\Angular\todos\node_modules\@angular-devkit\build-webpack\node_modules\rxjs\internal\Subscriber.js:205:16)
at SafeSubscriber.next (C:\Users\JayMoh\Desktop\Developer\Angular\todos\node_modules\@angular-devkit\build-webpack\node_modules\rxjs\internal\Subscriber.js:143:22)
at Subscriber._next (C:\Users\JayMoh\Desktop\Developer\Angular\todos\node_modules\@angular-devkit\build-webpack\node_modules\rxjs\internal\Subscriber.js:89:26)
at Subscriber.next (C:\Users\JayMoh\Desktop\Developer\Angular\todos\node_modules\@angular-devkit\build-webpack\node_modules\rxjs\internal\Subscriber.js:66:18)
at SwitchMapSubscriber.notifyNext (C:\Users\JayMoh\Desktop\Developer\Angular\todos\node_modules\@angular-devkit\build-webpack\node_modules\rxjs\internal\operators\switchMap.js:85:26)
at SimpleInnerSubscriber._next (C:\Users\JayMoh\Desktop\Developer\Angular\todos\node_modules\@angular-devkit\build-webpack\node_modules\rxjs\internal\innerSubscribe.js:27:21)
at SimpleInnerSubscriber.Subscriber.next (C:\Users\JayMoh\Desktop\Developer\Angular\todos\node_modules\@angular-devkit\build-webpack\node_modules\rxjs\internal\Subscriber.js:66:18)
at C:\Users\JayMoh\Desktop\Developer\Angular\todos\node_modules\@angular-devkit\build-webpack\src\webpack-dev-server\index.js:53:17
at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Users\JayMoh\Desktop\Developer\Angular\todos\node_modules\tapable\lib\HookCodeFactory.js:33:10),<anonymous>:54:1)
at AsyncSeriesHook.lazyCompileHook (C:\Users\JayMoh\Desktop\Developer\Angular\todos\node_modules\tapable\lib\Hook.js:154:20)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:9388) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block,or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection,use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:9388) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future,promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
而且它不会在浏览器上自动打开
节点版本:v14.4.0
NPM版本:6.14.8
Angular CLI:10.1.0
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)