Migrating to Yarn 2, but Yarn commands "set" and "policies" not found

Viewed 443

I am trying to migrate a project to Yarn 2 like it describes on their website: https://yarnpkg.com/getting-started/migration

When I run yarn set version berry I get this error:

yarn run v1.7.0
error Command "set" not found.

This github forum post says "Make sure you're using Yarn 1.22 as your global binary, or use yarn policies set-version instead." I tried typing yarn policies set-version berry then I get the same error:

yarn run v1.7.0
error Command "policies" not found.

I am using Windows 7
node -v shows 13.14.0
yarn -v shows 1.7.0

1 Answers

you should be in version 1.22 of yarn to be able to perform the set command

what solve to me the issue

yarn policies set-version
yarn set version berry
Related