distributions icon indicating copy to clipboard operation
distributions copied to clipboard

[ERROR] Node.js 18.7.0 on Ubuntu 22.04 does not include corepack

Open DaveT-T opened this issue 3 years ago • 1 comments
trafficstars

For anyone who needs corepack, apt-update upgrading to v18.7.0 does not include it. Must manually download setup_lts.x to (currently) get v18.12.1 which DOES include corepack.

Maybe you accidentally did not include corepack in v18.7.0??

From a mastodon install failure issue, learned this: SOLVED: must install the LTS version and not version 16.

when using curl -sL https://deb.nodesource.com/setup_16.x | bash - apt install -y nodejs the installer automatically runs apt-update and changes to v18.7.0 which does not include corepack

instead run for LTS curl -sL https://deb.nodesource.com/setup_lts.x | bash - apt install -y nodejs build-essential gcc g++ make ####this will install v18.12.1 which DOES include corepack

corepack enable (success) yarn set version stable (success)

When they released v18.7.0 they must have not included corepack

DaveT-T avatar Nov 17 '22 17:11 DaveT-T

Same here, upgrading 22.04 to 22.10 moved my v16 to v18 and do not have anymore corepack tho yarn is not found from local folder. Using the latest script has a more recent version than ubuntu ppa tho installing the official one over the ubuntu one. Note: Upgrading noejs after the bash does not work, uninstall and install back corepack appear finally.

What a mess from this ubuntu upgrade 😕 now all is back. Thanks for the issue I was looking around what happened and this helped a lot 😉

Hideman85 avatar Nov 19 '22 16:11 Hideman85

It looks like the solution for this issue is install the latest LTS version. curl -sL https://deb.nodesource.com/setup_lts.x | bash -

riosje avatar Dec 13 '22 17:12 riosje

This now has a deprecation warning:

================================================================================
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
================================================================================

                           SCRIPT DEPRECATION WARNING                    

  
  This script, located at https://deb.nodesource.com/setup_X, used to
  install Node.js is deprecated now and will eventually be made inactive.

  Please visit the NodeSource distributions Github and follow the
  instructions to migrate your repo.
  https://github.com/nodesource/distributions

  The NodeSource Node.js Linux distributions GitHub repository contains
  information about which versions of Node.js and which Linux distributions
  are supported and how to install it.
  https://github.com/nodesource/distributions


                          SCRIPT DEPRECATION WARNING

================================================================================
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
================================================================================

TO AVOID THIS WAIT MIGRATE THE SCRIPT
Continuing in 60 seconds (press Ctrl-C to abort) ...


## Installing the NodeSource Node.js 18.x repo...


## Populating apt-get cache...

jaguardo avatar Dec 21 '23 17:12 jaguardo

@jaguardo please migrate to our new repo solution https://github.com/nodesource/distributions/wiki/How-to-migrate-to-the-new-repository

After this invite you to use this script instead. https://github.com/nodesource/distributions?tab=readme-ov-file#installation-scripts

curl -SLO https://deb.nodesource.com/nsolid_setup_deb.sh
chmod 500 nsolid_setup_deb.sh
./nsolid_setup_deb.sh 18
apt-get install nodejs -y

riosje avatar Dec 21 '23 17:12 riosje

After this invite you to use this script instead. https://github.com/nodesource/distributions?tab=readme-ov-file#installation-scripts

@riosje In README inside installation instruction it is still showing old script. Shouldn't it be updated to use nsolid_setup_deb.sh?

sarim avatar Jan 05 '24 22:01 sarim