Open chrsep opened 4 years ago
i get something like this:
ready - started server on http://localhost:8020
info - Using external babel configuration from /Users/xxx/dev/xxx/xxx-stack/apps/zero.io/.babelrc
error - ../../.yarn/cache/rebass-npm-4.0.7-7a8e820861-5dbd569aa9.zip/node_modules/rebass/styled-components/index.js:20:0
Module not found: rebass tried to access react, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Required package: react (via "react")
Required by: rebass@npm:4.0.7 (via /Users/xxx/dev/xxx/xxx-stack/.yarn/cache/rebass-npm-4.0.7-7a8e820861-5dbd569aa9.zip/node_modules/rebass/styled-components/index.js)
null
i guess this is related?
When I build a project that uses rebass and @rebass/forms using yarn V2, I got the following errors:
The first one is caused by rebass and @rebass/forms having a dependency on reflexbox, which have react as its peer dependency, yet it doesn't provide it. Adding react to @rebass/forms and rebass as peer dependency should fix this.
The second one is caused by @rebass/forms importing @styled-system/should-forward-prop without it having an explicit dependency on it in package.json. Adding @styled-system/should-forward-prop should fix this.
My current workaround is to add the following into the project-level .yarnrc.yml: