Plasmic CLI doesn't support yarn v2

Hi. @plasmicapp/cli doesn’t support Yarn v2. Firstly, it incorrectly checks for dependencies such as @plasmicapp/react-web. Secondly, it tries to run incorrect command for installing.

• Plasmic cli should give the choice to skip installing @plasmicapp/react-web. Currently it shows: Plasmic error: Upgrading @plasmicapp/react-web is required to continue.
• Plasmic cli should check for packages correctly. Yarn v2 stores them in .yarn directory.
• Plasmic cli should check for packages correctly in workspaces. Yarn v2 stores them in .yarn at project level. So, if my website is in ~/my-project/packages/website, packages are in ~/my-project/.yarn.
• Plasmic cli should advice to run correct command. Yarn v2 doesn’t have --ignore-scripts -W flags for yarn add.
Quick fix is to allow passing “n” without error:

? A more recent version of @plasmicapp/react-web >=0.2.87 is required. Would you like to upgrade via "yarn add
 --ignore-scripts -W @plasmicapp/react-web"? (Y/n) n

Plasmic error: Upgrading @plasmicapp/react-web is required to continue.

Thank you for the thoughtful and detailed bug report!

Also it requires babel packages that are not listed in package.json. Yarn gives error when there are unlisted dependencies. So I had to add these lines to .yarnrc.yml:

packageExtensions:
  "@plasmicapp/cli@*":
    dependencies:
      "@babel/parser": "*"
      "@babel/traverse": "*"
  "@plasmicapp/code-merger@*":
    dependencies:
      "@babel/types": "*"

Hey @electronic_falcon, we’ve just released @plasmicapp/cli@0.1.165 with yarn v2 support: https://github.com/plasmicapp/plasmic/commit/16276ec9125abc49fbaceed6511de3d966bf943b; https://www.npmjs.com/package/@plasmicapp/cli Can you upgrade and see if it works as expected? Thank you again for the report which helped us fix it.

It works as expected, thanks