创建角度项目时出错 [英] Error while creating angular project

查看:23
本文介绍了创建角度项目时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建 Angular 项目,但收到这些警告和错误

I want to create Angular project and I get these warnings and errors

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

我尝试通过升级 npm 来修复这些错误,但是在 npm 升级后,我遇到了同样的问题

I have tried to fix these errors by upgrading npm but after npm upgrade, I got the same issues

推荐答案

我遇到了同样的问题.经过多次尝试和错误,我解决如下.安装纱线.然后运行以下代码 ng set --global packageManager=yarn然后运行 ​​ng new project_name这样,我就解决了问题

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

如果您想恢复到 npm,请运行以下命令:ng config -g cli.packageManager npm

If at any point you want to revert back to npm run this: ng config -g cli.packageManager npm

这篇关于创建角度项目时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆