documentation
documentation copied to clipboard
Installation from source instructions lead to broken yarn builds
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 latestinstead ofstable(why yarn classic has no problems with emoij-mart-lazyload, I have no idea); - Keeping 'stable', removing the instruction to use the
--pure-lockfileflag, and trying to get the build failure fixed with emoji-mart-lazyload; or - Keeping 'stable', removing the instruction to use the
--pure-lockfileflag, and regressing to upstream emoji-mart.
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)
--pure-lockfileis on yarn v1 "classic" and looks like It's not on yarn 3.2 (most recent version).emoji-mart's version is referenced as"npm:emoji-mart-lazyload", which is not a version, Its intention looks like referencing another package on npm: "emoji-mart-lazyload" as name of "emoji-mart", but it does not work on yarn 2+. I have never seen this format and I couldn't find a reference for it in a quick search.
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.
seems that now you need to do yarn set version classic and not yarn set version 1
Documentation reflect yarn set version classic closing as completed.