今天在做一个cesium项目的时候,脑子一热,想试试yarn命令,听说比npm丝滑~~结果出现错误如下:

yarn install v1.22.19
info No lockfile found.
error Workspaces can only be enabled in private projects.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

上面的错误,翻阅资料发现,是因为项目中使用了workspace,里面需要设置在package.json中加入:

"private": true

参考文档

 
https://blog.csdn.net/junjiahuang/article/details/120153043