如何解决这个错误? angular v11 原理图工作流程失败。往上看
Posted
技术标签:
【中文标题】如何解决这个错误? angular v11 原理图工作流程失败。往上看【英文标题】:How to solve this error ? angular v11 The Schematic workflow failed. See above 【发布时间】:2021-08-13 12:19:28 【问题描述】:每当我生成项目时,我都会收到此错误
我尝试过的命令:ng new dron(用于生成项目)
错误:
npm ERR! Found: postcss@8.2.14
npm ERR! node_modules/postcss
npm ERR! postcss@"8.2.14" from @angular-devkit/build-angular@0.1102.13
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR! dev @angular-devkit/build-angular@"~0.1102.13" from the root project
npm ERR! peer postcss@"^8.1.0" from autoprefixer@10.2.4
npm ERR! node_modules/autoprefixer
npm ERR! autoprefixer@"10.2.4" from @angular-devkit/build-angular@0.1102.13
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR! dev @angular-devkit/build-angular@"~0.1102.13" from the root project
npm ERR! 9 more (css-loader, cssnano, postcss-import, postcss-loader, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer postcss@"^8.2.15" from cssnano-preset-default@5.1.1
npm ERR! node_modules/cssnano/node_modules/cssnano-preset-default
npm ERR! cssnano-preset-default@"^5.0.1" from cssnano@5.0.2
npm ERR! node_modules/cssnano
npm ERR! cssnano@"5.0.2" from @angular-devkit/build-angular@0.1102.13
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR! dev @angular-devkit/build-angular@"~0.1102.13" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
【问题讨论】:
【参考方案1】:请检查您的 nodejs 版本。我面临着同样的问题。我机器上的nodejs版本是v16.2.0。我将其更改为 v12.22.1。它现在正在工作。
您可以从这里https://***.com/a/60258560/9574445查看特定角度版本的节点兼容版本
要更改 nodejs 版本,您可以使用 nvm https://github.com/nvm-sh/nvm
【讨论】:
以上是关于如何解决这个错误? angular v11 原理图工作流程失败。往上看的主要内容,如果未能解决你的问题,请参考以下文章
Angular v8 到 v11 - 禁用常春藤的 entryComponents 问题
Altium designer 修改原理图后更新PCB时,弹出错误如图。请问如何解决?修改原理图时我对元器件重新编号了
cadence软件pcb打不开了原理图能打开出现下面的错误,怎么办?谢谢了