"Monorepo With Yarn Workspaces Issue"

Since changing our codebase to a monorepo with yarn workspaces I’m having some issues

now every time I hit plasmic sync I get:

(note that I’m still hitting “plasmic sync” in the client folder, not at the root)

and i was getting all these errors:

I was able to solve that by installing plasmicapp/react-web on the root.

But that is only a temporary solution

Perhaps I don’t have the monorepo set up correctly, perhaps I represent an edgecase that the plasmic cli is not prepared for.
Maybe you have some advice.

Hi @still_peacock! The first issue (always saying react-web is not up to date) seems like a bug in our end (the way we’re detecting react-web version at the moment). The other error is weirder, I’ll see if I can reproduce it

it basically didn’t find
plasmicapp/react-web

(which has always been installed on the /client folder)

so I had to install it on the root

I still have to update react-web on every plasmic sync

and then I have to do “yarn install” on the root, because - otherwise that are errors about react-web not being found

This makes updating from plasmic take minutes!

I don’t know if this is the fault of plasmic or because I’ve switched to a monorepo.
But I could really use some help.

Video: plasmic sync issue after moving to a monorepo with a shared node_modules folder

@tiago please have a look

Sorry, @still_peacock. I’ll take a look into that. While it’s not fixed, we’re going to release a CLI version with a --skip-upgrade-check flag that you can use to skip that check at all.

Please upgrade CLI to 0.1.242 and use --skip-upgrade-check while we don’t fix it

I don’t know how, but it seems for the moment that the problem might be gone. I’ll have an eye on it.

Because I was just able to do a normal plasmic sync (without flag) without any errors or updates

Hey, @still_peacock. I think the issue with 503 was some intermittency not related to the issue. As for the issue with yarn workspaces, I’m trying to reproduce it with no luck. I created a simple directory structure like:

/package.json
/workspace-a/package.json
/workspace-b/package.json

/package.json has:

{
  "private": true,
  "workspaces": ["workspace-a", "workspace-b"]
}

If I sync some Plasmic project in /workspace-a, the CLI installs @plasmicapp/react-web in /workspace-a and it works. (If I run “plasmic sync” again it won’t ask me to upgrade it)

Are you able to reproduce your issue in a minimal environment like that so we can investigate further? Do you see any errors on @plasmicapp/react-web detection? Can you run yarn list --json --pattern @plasmicapp/react-web on the directory you’re running “plasmic sync”?