Can "yarn add global " update packages installed by npm?

huangapple go评论65阅读模式
英文:

Can "yarn add global " update packages installed by npm?

问题

我使用yarn作为包管理器,但第一次安装nativescript时,我使用了:

npm install -g nativescript

我可以使用yarn add global nativescript来更新包吗?

**注意:**我在我的项目文件夹中运行了tns package-manager set yarn

英文:

I use yarn as package-manager but the first time I install nativescript I used;

npm install -g nativescript

Can I update the package using yarn add global nativescript?

NOTE: I run tns package-manager set yarn in my projects folder

答案1

得分: 2

是的;

> yarn global add nativescript

yarn global upgrade

更新由 npm 安装的包

请考虑查看 从npm迁移

感谢 @Manoj 的回答

英文:

Yes ;

> yarn global add nativescript

and

yarn global upgrade

updates packages which are installed by npm

Please consider checking migrating from npm

Thanks to @Manoj for answer

huangapple
  • 本文由 发表于 2020年1月3日 14:05:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/59573908.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定