首页 > 解决方案 > 在 Mac OS X 和 Linux 中使用 yarn lint 链接依赖项

问题描述

伙计们,我已经花了很多时间,但仍然有问题。

我有几个项目的monorepo,不要问我为什么,拜托:-(

repo (relay-compiler, graphql schema)
---repo-one (babel6, webpack3, legacy)
------yarn && cd ../repo-two && yarn link && cd ../repo-one yarn link repo-two
---repo-two (babel7, library with shared components for one and three)
---repo-three(babel7,)
------yarn && cd ../repo-two && yarn link && cd ../repo-three && yarn link repo-two

目前,我在 Linux 机器上构建时遇到问题,但在 Mac OS X 上,一切正常。

ERROR in ../repo-two/Models/Model.js
Module build failed: ReferenceError: Unknown plugin "relay"

标签: reactjsgraphqlyarnpkgrelay

解决方案


推荐阅读