Yarn: error: no such option: --pure-lockfile

I’m trying to set up a fresh Mastodon development environment. My development machine is running an up-to-date Debian testing. I also have Node 10.17 installed.

I am following the instructions, although notably, the current version of Mastodon seemed to want Ruby 2.6.5 instead of 2.6.1, so I went back and installed that version. I am unable to get yarn set up in any way, and I’m not sure what to do from here.

mastodon@blagojevich:~/live$ yarn install --pure-lockfile
Usage: yarn [options]
yarn: error: no such option: --pure-lockfile
mastodon@blagojevich:~/live$ yarn install
00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'install'
mastodon@blagojevich:~/live$ yarn
00h00m00s 0/0: : ERROR: There are no scenarios; must have at least one.

I’m not sure where to go from here and I’d appreciate whatever help anyone can provide!
Thanks!

1 Like

what does yarn --version say? how did you exactly install yarn?

Debian has a completely different tool under the name ‘yarn’, the instructions given are for Ubuntu only.

Hi there, I managed to get past this problem by (drumroll) reinstalling yarn.
Debian does provide a yarn package which worked (which was still called yarn, incidentally).
Now I have a segfault when trying to run bundle, which I’ll try to pick through and maybe open another thread :slight_smile:
Thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

Regarding this old entry: Yarn: error: no such option: --pure-lockfile
That’s not a Debian issue, but a “problem” with the manual. Following the installation instructions is not enought, as it is not completely detailed. To avoid that problem in section Yarn, after:

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

You should run:

apt-get update && apt-get install -y yarn

You should have made the same previously with the nodejs package. In that case, indicate the version. So, in section Nodejs, after:

curl -sL https://deb.nodesource.com/setup_12.x | bash -

you have to enter:

apt-get install -y nodejs=12*

You do not need to update the apt cache because curl | bash does it for you. Otherwise, precede with apt-get update.

Hope it helps.

Sincerely,

Luis (Luisfa).

I think the order of sections is wrong - first install node, then yarn repository and after this issue a large apt-get install

Thank you very much. I followed your install instructions to install yarn and then all my mastodon services worked, particularly the mastodon-streaming failed to start because I didn’t get yarn installed because that error.

1 Like

Somehow, have a similar problem:

When I type yarn install --pure-lockfile as described in the instructions, I get the error Unknown Syntax Error: Unsupported option name (“–pure-lockfile”).

I’m on Ubuntu 20.04 LTS.

yarn --version says it’s 3.2.4 and I’ve already tried updating yarn, but I get the message that at already up-to-date. However, here I’m told it’s 1.22.19 - weird.

Does anyone have a solution for this?

Ah, I think I got it. I had a version of yarn which is too new.

yarn set version classic

helped.