NodeJS ENV Similar to JENV and PyENV
It seems these 2 are good.
https://github.com/nodenv/nodenv
https://github.com/nvm-sh/nvm
Let me try nodenv, it seems more similar to JENV and PyENV.
https://blog.daskepon.com/install-nodejs-with-nodenv-on-macos/
Install the tool nodenv
> git clone https://github.com/nodenv/nodenv.git ~/.nodenv
> cd ~/.nodenv/
> src/configure
> make -C src
On MAC
> vi ~/.profile
export PATH="$HOME/.nodenv/bin:$PATH"
eval "$(nodenv init -)"
> . ~/.profile
Install node-build
> git clone https://github.com/nodenv/node-build.git $(nodenv root)/plugins/node-build
Check version
> nodenv --version
nodenv 1.3.1+11.5024679
List all versions
> nodenv versions
* system => node-v12.14.1 (set by /Users/hluo/.nodenv/version)
List the version I can install
> nodenv install -l
Install an old version and a new version
> nodenv install 8.17.0
> nodenv install 12.14.1
Choose the current directory to using 8.17.0
> nodenv local 8.17.0
Choose global to use 12.14.1
> nodenv global 12.14.1
It is pretty well
> nodenv versions
system
* 8.17.0 (set by /Users/hluo/.nodenv/.node-version)
12.14.1
12.16.1
Try the sample things on Ubuntu and CentOS7
On Ubuntu
Install the tool nodenv
> git clone https://github.com/nodenv/nodenv.git ~/.nodenv
> cd ~/.nodenv/
> src/configure
> make -C src
> vi ~/.profile
PATH="$HOME/.nodenv/bin:$PATH"
eval "$(nodenv init -)"
> . ~/.profile
Install node-build
> git clone https://github.com/nodenv/node-build.git $(nodenv root)/plugins/node-build
Check version
> nodenv --version
nodenv 1.3.1+11.5024679
Install and try
> nodenv install -l | grep 8.
> nodenv install 8.17.0
> nodenv install 12.16.1
> nodenv global 12.16.1
> node --version
v12.16.1
> nodenv versions
8.17.0
* 12.16.1 (set by /home/carl/.nodenv/version)
On CentOS7
Install the tool nodenv
> git clone https://github.com/nodenv/nodenv.git ~/.nodenv
> cd ~/.nodenv/
> src/configure
> make -C src
> vi ~/.bash_profile
export PATH="$HOME/.nodenv/bin:$PATH"
eval "$(nodenv init -)"
> . ~/.bash_profile
Install node-build
> git clone https://github.com/nodenv/node-build.git $(nodenv root)/plugins/node-build
Check version
> nodenv --version
nodenv 1.3.1+11.5024679
Install and try
> nodenv install -l | grep 8.
> nodenv install 8.17.0
> nodenv install 12.16.1
> nodenv global 12.16.1
> node --version
v12.16.1
> nodenv versions
8.17.0
* 12.16.1 (set by /home/carl/.nodenv/version)
References:
https://www.jianshu.com/p/e21e3783304f
https://github.com/thenativeweb/nodeenv
https://github.com/DJMcK/nodenv
https://github.com/nvm-sh/nvm
https://github.com/nodenv/nodenv
https://wiz.gitbooks.io/developer-book/nodenv_setup.html
https://www.kutu66.com/GitHub/article_132253
https://blog.daskepon.com/install-nodejs-with-nodenv-on-macos/
分享到:
相关推荐
This book is designed for JavaScript developers of any skill level that want to get up and running using Node.js and MongoDB to build full-featured web applications. A basic understanding of ...
This book also explains how to build webapps and host it on windows iis, using iis node Table of Contents Chapter 1 Introduction Chapter 2 Why Should you Learn Nodejs With Koa2 Chapter 3 Why is it ...
NodeJS-BackAnd NodeJS模块允许使用BackAnd Apis 非常少。 更多即将推出。 指示 npm安装 编辑安全详细信息 在GIT存储库或网站根目录之外的文件系统上的某个位置创建一个“ .js”文件。 该文件的内容应为:exports ...
nodejs初级教程
use nodejs+express to write api,use react to ajax,use webpack to package. github:https://github.com/zhaoyu69/nodejs-express-react 有问题欢迎指出,如果有用 欢迎star★。
opencv4nodejs github地址 https://github.com/justadudewhohacks/opencv4nodejs#how-to-install
这是一个vue+nodejs+express+mybatis够成的一个项目案例
Django Webpack样板 具有用于资产管理器(ES5 +,SCSS等)的Webpack配置...按照app/.env.example将.env文件添加到app/.env ,您必须至少具有DB_HOST, DB_PORT, DB_USER, DB_PASSWORD, DB_NAME才能进行数据库连接。 这是
NodeJS
,nodEjs ,nodEjs ,nodEjs ,nodEjs ,nodEjs ,nodEjs ,nodEjs ,nodEjs ,nodEjs
节点js NodeJS示例项目
nodejs安装及环境配置
资源名称:NodeJs技术经典文档资源目录:【】Node.js开发指南_中文正版【】nodejs开发指南pdf及源码及win安装程序【】nodejs手册中文【】NodeJs教程【】umav4simple【】七天学会NodeJS【】七天学会NodeJS【】深入浅...
hpts(http-proxy-to-socks) 一个nodejs客户端将socks代理转换为http代理
Productive and Fun Web Development with NodeJS and Microsoft Developer Tools
vue+nodejs+express+mybatis and vue+nodejs+express+mybatis资源分享
nodejs 搭建oauth服务器的代码 Install nodejs and npm and then, simply run npm install and npm start. The server should now be running at http://localhost:3000.
NodeJS开发指南
Learn With Angular 4, Bootstrap, and NodeJS 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
liunx nodejs+nginx配置收藏版liunx nodejs+nginx配置收藏版