Unable to upgrade yarn

In order to build my react-native app, I need the latest version of yarn. The one installed by default (v0.23.2) is too old, and triggers the error:

error @sentry/wizard@0.7.3: The engine "yarn" is incompatible with this module. Expected version ">=1.0.2".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

I have tried upgrading it with npm (and also reinstalling it by downloading it via curl), but the old version is still the one being used. After upgrade/reinstall I have also tried to reload the shell, and then run yarn install manually from that bash script.

My build is running on Node v8.9.1 (through the NVM package). The build works fine locally.

What’s the script / command you tried to do this?

Also, which stack do you use? On the MacOS stacks yarn is installed via brew (homebrew), not via NPM, that might be the issue. If that would be the case then you can upgrade using brew:

brew upgrade yarn

If you have any questions just let us know!

1 Like

Ah nice! Changing the stack to OSX, and upgrading with brew solved my problem.

I was using the hybrid Xcode/Android stack, without knowing the exact implications of using that one instead of OSX.

Thank you so much for your help and quick reply!

1 Like

Glad to hear it worked, just a note, the Hybrid stacks (including the Visual Studio for Mac / Xamarin ones) are based on the standard macOS stacks, so using brew to upgrade yarn there should also work :blush: