Problems install Yarn on Debian 9 Stretch

When I installed Yarn on Debian Stretch I haven't problemsn, but when I launch yarn init I obtain a error:

ERROR: [Errno 2] No such file or directory: 'init'

Even though when doing

yarn --version

returned 0.27

 

so How Install Yarn properly

The solution I obtained was (and according to this tuto):

First download the repositoriy key for verify identity:

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -

After add the url repository to file sources.list.d

echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

And if you had installed Yarn before you have to force the installation, in this way:

apt-get -o Dpkg::Options::="--force-overwrite" install yarn

And with this it should be enough.

 

References:

  1. https://github.com/yarnpkg/yarn/issues/3708
  2. https://yarnpkg.com/lang/en/docs/install/

 

Loading...
Loading...