Skip to content

Instantly share code, notes, and snippets.

@jaindinkar
Last active May 4, 2023 14:30
Show Gist options
  • Save jaindinkar/112984ef0a2175c1125e665c3c44fa33 to your computer and use it in GitHub Desktop.
Save jaindinkar/112984ef0a2175c1125e665c3c44fa33 to your computer and use it in GitHub Desktop.
NodeJS Troubleshooting

NodeJS Troubleshooting Guide

If anything goes wrong:

  • Step 1: Remove node and all the global packages related to it. Follow: this link.
    • Old yarn installation might bug you so delete: ~/.yarnrc and ~/.yarnrc.config
    • Make sure that eveything related to nodejs, npm, yarn, node is removed.
  • Step 2: Install nvm and update source. Follow this link.
  • Step 3: Install latest lts version of nodejs, npm, yarn.
    • Install node. nvm install --lts --latest-npm <your-node-version> (This will install+club latest npm version with your node installation)
    • Install yarn. Follow this link. Used corepack.
    • Set Yarn version. yarn set version classic (sets the classic version of yarn 1.xx)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment