Comments (2)
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.
Thank you.
from n.
Related Issues (20)
- Add a new command (say `use`) to switch to preinstalled versions of Node.js HOT 12
- Retry when downloading/extraction of Node.js tar fails HOT 12
- OS recogonition mistakes HOT 4
- Modify repo "About" to match npm search criteria HOT 1
- LTS downloading stable instead of LTS HOT 3
- corepack is not removed when downgrading node HOT 4
- Default install location (N_PREFIX) to home HOT 4
- Unsupported Platform for window HOT 1
- Incorrect cache folder path in show_diagnostics HOT 2
- Installation error. Pls help. HOT 3
- n latest curl: (23) Failed writing received data to disk/application HOT 3
- Problem with curl 8.7.1 HOT 4
- 。
- N_NODE_MIRROR, Error: failed to download version index + "error": "this version doesn't exist: index.tab" HOT 2
- Finding `engine` is pretty slow HOT 6
- Is there a way to force n to change versions even if node is running? HOT 1
- node executable and libs seem to be duplicated HOT 9
- Using `auto` or `engine` is inconvenient due to lack of fallback
- should not network curl `index.tab` when using numeric `.node-version` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from n.