mirror of
https://github.com/eggjs/egg.git
synced 2024-12-04 07:14:30 +00:00
932 B
932 B
title: Installation
Installation
The best way to install node is nvm in OS X and Linux, or nvmw in Windows.
Don't use sudo.
After install nvm, you can install node.
$ nvm install 4
You can switch version that is installed.
$ nvm use 4
$ node -v
$ nvm use 6
$ node -v
Global module
Global module is the module that is installed with -g flag. You can share global modules between multi version.
If you are using nvm, it will switch prefix when switch versions. But you can specify prefix to use one global module between versions.
- Edit
~/.npmrc,appendprefix=~/.npm-global - Edit
~/.zshrcor~/.bashrc,,appendexport PATH=~/.npm-global/bin:$PATH - Run
source ~/.zshrcorsource ~/.bashrc