documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Installation from source instructions lead to broken yarn builds

Open aescling opened this issue 3 years ago • 2 comments

Firstly, installation instructions say to run yarn set version stable, causing the initial Mastodon build instructions to fail because --pure-lockfile does not exist on that version of yarn. Bypassing that hurdle, bulids will still break over emoji-mart-lazyload for reasons I do not understand. (My guess it is related to the fact that npm doen not like that package’s version number.)

This can be fixed in one of three ways, only one of which seems remotely reasonable:

  • Telling the user to run yarn set version latest instead of stable (why yarn classic has no problems with emoij-mart-lazyload, I have no idea);
  • Keeping 'stable', removing the instruction to use the --pure-lockfile flag, and trying to get the build failure fixed with emoji-mart-lazyload; or
  • Keeping 'stable', removing the instruction to use the --pure-lockfile flag, and regressing to upstream emoji-mart.

aescling avatar Apr 10 '22 04:04 aescling

I came into this situation too. related: #927

Without source change, I think yarn 1 ("classic") is required for now by subtle? (maybe?) problems. (yarn set version stable -> yarn set version 1)

sftblw avatar Apr 15 '22 17:04 sftblw

Ran into the same issue tonight. Here's what I found:

"emoji-mart": "npm:emoji-mart-lazyload" is generated by yarn add <package>@npm:<other-package> in Yarn classic, which creates an alias causing one package to be installed under a different name. Yarn 2 clearly doesn't support this format, but I didn't find any specific documentation about the change.

In order to resolve this issue after I'd already run yarn set version stable in my local environment, I ended up having to delete .yarn/ and .yarnrc.yml from my home directory and the mastodon repo root directory, as well as .node/ in the repo root. I also ran corepack disable, though I don't know enough about the corepack system to understand if that's actually necessary or not. At that point I was able to yarn set version 1 and could yarn install --pure-lockfile with no problems.

eritbh avatar Apr 26 '22 01:04 eritbh

seems that now you need to do yarn set version classic and not yarn set version 1

puyoxyz avatar Nov 07 '22 03:11 puyoxyz

Documentation reflect yarn set version classic closing as completed.

vmstan avatar Nov 24 '23 17:11 vmstan