loading...

Discussion on: How to insert an Expo project in a Monorepo

Collapse
albertgao profile image
AlbertGao

AlbertGao@Albert-LottoNZ-Laptop monorepo % pwd
/Users/AlbertGao/codes/teamingCloud/workspace/monorepo
AlbertGao@Albert-LottoNZ-Laptop monorepo % yarn workspace @monorepo/universal add expo-yarn-workspaces metro-config -D -W
yarn workspace v1.22.4
error Cannot find the root of your workspace - are you sure you're currently in a workspace?
info Visit yarnpkg.com/en/docs/cli/workspace for documentation about this command.
AlbertGao@Albert-LottoNZ-Laptop monorepo %

Thanks for the post!
Stuck at the 1st step... Anything I am missing?

Collapse
mauriciord profile image
Maurício R Duarte Author

As the error says, are you in a workspace?

// /Users/AlbertGao/codes/teamingCloud/workspace/monorepo/package.json

{
  "name": "monorepo",
   // ...
  "workspaces": {
    "packages": [
      "packages/*"
    ]
  },
Collapse
albertgao profile image
AlbertGao

Thanks! I wondered why there is no such creating step in the blog, then I thought yarn might magic figure it out, haha was wrong.

I ended up following the official yarn doc to create a workspace, and make sure it is working, then I followed the 2nd part of this blog to add the expo support, all good now!

Thanks! :)

Thread Thread
mauriciord profile image
Maurício R Duarte Author

Thank you! I'll edit this post and write a link how to config an monorepo.