[英]How to solve this error ? angular v11 The Schematic workflow failed. See above
Whenever im generating a project i am getting this error每当我生成一个项目时,我都会收到此错误
command i tried: ng new dron (for generating the project)我试过的命令:ng new dron(用于生成项目)
error:错误:
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.
Please check your nodejs version.请检查您的 nodejs 版本。 I was facing the same issue.
我面临着同样的问题。 The nodejs version on my machine was v16.2.0.
我机器上的nodejs版本是v16.2.0。 I changed it to v12.22.1.
我将其更改为 v12.22.1。 It's working now.
它现在正在工作。
You can check the compatible version of node for particular angular version from here https://stackoverflow.com/a/60258560/9574445您可以从此处检查特定 angular 版本的节点兼容版本https://stackoverflow.com/a/60258560/9574445
To change the nodejs versions you can use nvm https://github.com/nvm-sh/nvm要更改 nodejs 版本,您可以使用 nvm https://github.com/nvm-sh/nvm
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.