<p></p>
<p dir="auto">So thinking about this, there's two main options:</p>
<ul dir="auto">
<li>Change the installation so that both a) a new enough version of node and b) a non-Ubuntu package of yarn is installed. For example, use nodesource for node 16+ and <a href="https://dl.yarnpkg.com/debian" rel="nofollow">https://dl.yarnpkg.com/debian</a> apt repository for yarn. This would resolve both the engines and the yarnpkg binary naming issues, and <code class="notranslate">bundle exec rails yarn:install</code> would then work.</li>
<li>Alternatively, change the installation instructions to run <code class="notranslate">bundle exec bin/yarn install</code> instead. This way we can keep using the package name detection and keep ignoring the engines.</li>
</ul>
<p dir="auto">I lean towards the second option. This is to keep the installation as simple as possible. Since we can actually run everything we need for the site just fine with the versions of node and yarn that Ubuntu supply, even on 20.04, it seems unnecessary to make new developers jump through hoops of adding additional apt repositories. If they already have newer versions of node and/or yarn on their system, bin/yarn will still work fine for them too.</p>
<p dir="auto">We would need to revisit this if/when we genuinely need a newer node engine, or at some point the stars will align and some future Ubuntu LTS release will have a <code class="notranslate">yarn</code> binary plus a new enough version of node for all of our packages. And at that point <code class="notranslate">bin/yarn</code> will be obsolete and we can go back to <code class="notranslate">bundle exec rails yarn:install</code>.</p>
<p dir="auto">The one small wrinkle here is that one of our dev node packages, eslint, genuinely requires node 12+. It <a href="https://github.com/openstreetmap/openstreetmap-website/issues/3275#issuecomment-1106929281" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/3275/hovercard">was mentioned</a> in April 2022, and was broken by the <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3339" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/3339/hovercard">upgrade to eslint 8.x</a> in October 2021. It wasn't picked up at the time, due to the whole "Github flavoured Ubuntu" thing which means that eslint still passes on Ubuntu 20.04 in CI. eslint will work with standard packages on Ubuntu 22.04, but not on Ubuntu 20.04. To fix this particular issue, a followup task will be to upgrade all our installations (INSTALL.md, Dockerfile, vagrant, etc) to 22.04.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/3579#issuecomment-1371453162">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLNVT62O6EFZGTPQCULWQXUH3ANCNFSM5ZNUQ7OQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLLFNT5432N7QDYZI53WQXUH3A5CNFSM5ZNUQ7O2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOKG7LN2Q.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/issues/3579/1371453162</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/3579#issuecomment-1371453162",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/3579#issuecomment-1371453162",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>