However, this causes numerous errors resolving react-native-web in other dependencies installed in the root node_modules, for example:
Can't resolve 'react-native-web/dist/exports/TouchableWithoutFeedback' in '/Users/tlmader/Dev/indienav/node_modules/react-native-elements/src/avatar'
If you're trying to use a package make sure that 'react-native-web/dist/exports/TouchableWithoutFeedback' is installed. If you're trying to use a local file make sure that the path is correct.
error undefined failed
I added react-native-web to the root package.json to prevent these errors.
Current Behavior
When running
gatsby build
in a monorepo using Yarn workspaces, the build fails with the following output:Expected Behavior
gatsby-build
should successfully build the application in a Yarn workspace.Workaround
As a workaround, I hosted
gatsby-plugin-react-native-web
and its dependencies to the childpackage.json
:However, this causes numerous errors resolving
react-native-web
in other dependencies installed in the rootnode_modules
, for example:I added
react-native-web
to the rootpackage.json
to prevent these errors.Web
package.json
Root
package.json
Environment Info