Nodeenv freezes when setting up a new environment

I tried using nodeenv as follows:

 $ virtualenv --python=python2.7 venv $ source venv/bin/activate (venv) $ pip2.7 install nodeenv (venv) $ nodeenv --node=0.12.2 nenv 

But it freezes:

  * Install node (0.12.2).. 

I am not sure how to research this problem. Thoughts? Do I need to install Node before all this (currently $ node \ -sh: node: command not found )? I had the impression that the correct version of Node would be installed by nodeenv.

+5
source share
2 answers

This is probably not hanged, but just slow. nodeenv runs the C ++ compiler (presumably for compiling v8). For this reason, creating a nodeenv environment takes a few minutes on my computer. To avoid this, you can use the --prebuilt switch to load the previously created node.js instead of compiling from the source:

 nodeenv --prebuilt nenv 

If you prefer to compile, you can see how it does its work by running nodeenv, and then, while it still works, run a command like this:

 watch 'ps auxfwww | grep -A4 make' 
+2
source

I would recommend using the Will Farrington nodenv .

This is a simple script shell that allows you to install node.js in your multiple versions, even in io.js.

To install the latest stable release:

 git clone -b v0.3.4 https://github.com/wfarr/nodenv.git ~/.nodenv 

Then add the following to the shell configuration at the end:

 export PATH="$HOME/.nodenv/bin:$PATH" eval "$(nodenv init -)" 

To use and get more information, read the Readme file in the repo: https://github.com/wfarr/nodenv

0
source

All Articles