Created
February 23, 2023 18:40
-
-
Save martin-braun/82a05e6f52bff9e78e4e4814cbe5dd8a to your computer and use it in GitHub Desktop.
Find recommend NPM version for current node version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# TODO: Install nodejs | |
read npmv < <(echo $(node -e "fetch('https://nodejs.org/dist/index.json').then(r=>r.json()).then(e=>console.info(e.filter(a=>a.version=='$(node -v)')[0].npm))")) | |
# TODO: Install npm version $npmv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment