Just reporting that I created a brand new monorepo. Installed a brand new test app with expo init testApp (SDK40 and selected the tabs typescript template):
yarn add --dev expo-yarn-workspaces
in the test app dir.
Added a postinstall
script to the monorepo main package.json like so:
{
"private": true,
"name": "monorepo",
"version": "1.0.0",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"testApp": "yarn workspace @monorepo/test expo start --clear",
"postinstall": "cd ./packages/testApp && expo-yarn-workspaces postinstall"
},
"workspaces": [
"packages/*"
]
}
Added this to the testApp app.json:
"packagerOpts": {
"config": "metro.config.js"
}
And of course added metro.config.js file to the testApp root dir with
const { createMetroConfiguration } = require('expo-yarn-workspaces');
module.exports = createMetroConfiguration(__dirname);
Started the metro server with yarn testApp and I’m getting Module "11" is missing from the asset registry