Npm 如何从旧的Angular CLI软件包切换到新的Angular CLI软件包?

Npm 如何从旧的Angular CLI软件包切换到新的Angular CLI软件包?,npm,angular-cli,Npm,Angular Cli,每次运行ng命令时,它都会打印此警告: As a forewarning, we are moving the CLI npm package to "@angular/cli" with the next release, which will only support Node 6.9 and greater. This package will be officially deprecated shortly after. 下面有关于禁用警告的说明,但没有关于用户应采

每次运行ng命令时,它都会打印此警告:

As a forewarning, we are moving the CLI npm package to "@angular/cli" with the next release,
which will only support Node 6.9 and greater. This package will be officially deprecated
shortly after.
下面有关于禁用警告的说明,但没有关于用户应采取何种操作以切换到使用新包名的建议

我的第一个想法只是卸载并重新安装CLI,但所有文档都已更新,以引用新包,因此我无法计算出需要首先删除的旧包的名称

建议我只运行
npm安装-g@angular/cli@latest
,但这失败了:

npm ERR! code EEXIST
npm ERR! path ~/.nvm/versions/node/v15.14.0/bin/ng
npm ERR! EEXIST: file already exists
npm ERR! File exists: ~/.nvm/versions/node/v15.14.0/bin/ng
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
在尝试安装时,是否有人可以建议我如何应对原始警告和此错误