我正在尝试设置一个React和Expo monorepo项目,一切似乎都很好,直到我想根据react导航文档安装带有expo install的react-navigation,因为expo安装在后台使用yarnyarn add v1.21.1
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Lerna同时支持NPM和Yarn,并允许配置使用Yarn工作区。我不清楚Lerna with Yarnworkspaces是否比Lerna with NPM有什么明显的优势。许多帖子声称,Lerna与Yarnworkspaces开箱即用做了或多或少相同的事情。
在Yarnworkspaces中使用Lerna比在NPM中使用Lerna有什么优势吗?
我想使用Yarn的工作区特性在我的每个工作区中运行一个shell命令。Yarn支持yarnworkspaces run foo命令,但foo必须是在package.json中定义的脚本,而不是任意命令(例如,echo "foobar")。在我的顶级package.json中使用"foo": "yarnworkspaces run echo 'foobar'"。