Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

corepack enable - command not found: nodejs 16 moved to 18.7 on apt update first time #1032

Closed
DaveT-T opened this issue Nov 16, 2022 · 5 comments

Comments

@DaveT-T
Copy link

DaveT-T commented Nov 16, 2022

Fresh install Ubuntu 22.04-- following mastodon install from source instructions
Specifically requested nodejs v 16 (failed several prev wipe|clean installs trying to use v19)
curl -sL https://deb.nodesource.com/setup_16.x | bash -

during subsequent steps
apt update
upgraded nodejs to version 18.7
ran apt install -y on the whole set including nodejs no errors all went fine all success

next step corepack enable fails
'corepack: command not found'

without yarn, mastodon will not function
without corepack, yarn may not function correctly

did deep dive searches for help. During prev attempts with nodejs v19 I installed yarn and corepack using npm but final deployment of mastodon would not generate any user pages or content (admin pages worked tho) so tried again this time with a clean wipe fresh UBUNTU with strict nodejs version 16 requested and the apt update seems to have broken something as corepack is not included in standard install of version 18.7

Help------continue by installing npm, then using npm to install corepack and yarn?
Or stop and wait until someone figues out why corepack and yarn not included in 18.7 clean install

@DaveT-T
Copy link
Author

DaveT-T commented Nov 16, 2022

node v shows 'v18.7.0'
so it seems to have installed normally just without corepack

@DaveT-T
Copy link
Author

DaveT-T commented Nov 17, 2022

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
Copy link
Author

DaveT-T commented Nov 17, 2022

Oops..forgot. If you already installed setup_16.x or apt-update has otherwise changed your system to nodejs v18.7.0
simply remove and reinstall nodejs:
perform as root
node -v (this will show what version is currently installed in my case v18.7.0)
apt remove nodejs
apt autoremove
and then install the LTS version (currently v18.12.1)
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

@vmstan vmstan closed this as not planned Won't fix, can't repro, duplicate, stale Dec 11, 2023
@jaguardo
Copy link

Looks like there is now a deprecation warning, from running the first script:


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

                           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) ...

@vmstan
Copy link
Contributor

vmstan commented Dec 21, 2023

Yeah that should be fixed by #1340 just need to get it merged @renchap :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants