Code Monkey home page Code Monkey logo

Comments (2)

shadowspawn avatar shadowspawn commented on August 25, 2024

A1: n does not have a global package migrations feature. n installs to a single prefix so you don't need to reinstall global packages when switching node versions using n.

A2: I think uninstalling the global packages from the old location is sensible so you don't have the ongoing confusion of packages installed in two locations.

You can do this without needing to reinstall node and npm by specifying the prefix explicitly, which you worked out is /usr for your old install. Doing one package at a time and not trying a fancy all-at-once...

# check what is installed in old location so can reinstall as needed
$ npm --prefix=/usr list -g  

# delete pm2 from old location
$ npm --prefix=/usr uninstall -g pm2

# check prefix is pointing at expected /usr/local before reinstalling
$ npm prefix -g
/usr/local

# check what is currently installed
$ npm list -g

# install pm2 if needed
$ npm install -g pm2

from n.

hongz1 avatar hongz1 commented on August 25, 2024

Thank you.

from n.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.