简体   繁体   English

创建角度项目时出错

[英]Error while creating angular project

I want to create Angular project and I get these warnings and errors 我想创建Angular项目,但收到这些警告和错误

npm WARN deprecated istanbul-lib-hook@1.2.1: 1.2.0 should have been a major version bump
npm WARN deprecated nodemailer@2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated socks@1.1.9: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN deprecated mailcomposer@4.0.1: This project is unmaintained
npm WARN deprecated uws@9.14.0: stop using this version
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated buildmail@4.0.1: This project is unmaintained
npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm ERR! write after end
npm ERR! write after end

I have tried to fix these errors by upgrading npm but after npm upgrade, I got the same issues 我试图通过升级npm来解决这些错误,但是在npm升级后,我遇到了同样的问题

I was in same problem. 我遇到了同样的问题。 after much try and error, i solved as follows. 经过多次尝试和错误后,我解决了以下问题。 install yarn. 安装纱。 then run the following code ng set --global packageManager=yarn and then run ng new project_name this way, i solved the problem 然后运行以下代码ng set --global packageManager=yarn然后以这种方式运行ng new project_name ,我解决了问题

If at any point you want to revert back to npm run this: ng config -g cli.packageManager npm 如果您想恢复为npm,请运行以下命令:ng config -g cli.packageManager npm

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM