创建角度项目时出错

时间:2018-06-25 09:22:08

标签: javascript angular npm

我想创建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

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

1 个答案:

答案 0 :(得分:0)

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

如果您想在任何时候恢复为npm,请运行以下命令:      ng config -g cli.packageManager npm