The way I could fix it was a little simple, but it coust me so many minutes to figure it out.
Here you go:
Instead of runnig the code as says the yarnpkg site, do:
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
Then run JUST the following code: