nodeenv
Node.js virtual environment builder
Downloads & Community Adoption
Health & Engineering Analysis (5 Pillars)
1. Governance & Community100 / 200 ▾
2. PEP Metadata & Packaging150 / 200 ▾
3. Security & Supply Chain100 / 200 ▾
4. Documentation, SEO & Ecosystem100 / 200 ▾
5. Engineering, CI & Quality130 / 200 ▾
Official Documentation & Usage Guide — nodeenv
Show full original documentation (English README) ▾
Node.js virtual environment
nodeenv (node.js virtual environment) is a tool to create
isolated node.js environments.
It creates an environment that has its own installation directories, that doesn't share libraries with other node.js virtual environments.
Also the new environment can be integrated with the environment which was built by virtualenv_ (python).
If you use nodeenv feel free to add your project on wiki: Who-Uses-Nodeenv_.
.. _Who-Uses-Nodeenv: https://github.com/ekalinin/nodeenv/wiki/Who-Uses-Nodeenv
.. image:: https://github.com/ekalinin/nodeenv/actions/workflows/main.yml/badge.svg?branch=master :target: https://github.com/ekalinin/nodeenv/actions/workflows/main.yml :alt: CI
.. contents:: :local:
Install
Global installation ^^^^^^^^^^^^^^^^^^^
Use pipx_ to install nodeenv as a command in an isolated Python
environment. Install pipx according to its documentation, then run::
$ pipx install nodeenv
$ pipx ensurepath
Open a new terminal after pipx ensurepath so the directory containing
nodeenv is on PATH. This keeps nodeenv's Python packages separate
from your system Python. Alternatively, use the local installation below.
When using nodeenv -p with pipx, activate the project's Python virtual
environment first, or pass its path explicitly, for example
nodeenv -p .venv. Otherwise Node.js is installed in nodeenv's own pipx
environment and is lost when pipx reinstall nodeenv recreates it.
From a source checkout, Debian users can instead build and install a
package with dpkg_::
$ ln -s debian-upstream debian
$ dpkg-buildpackage -uc -us -b
$ sudo dpkg -i $(ls -1rt ../nodeenv_*.deb | tail -n1)
.. _dpkg: https://www.debian.org/doc/manuals/debian-faq/ch-pkgtools.en.html
Local installation ^^^^^^^^^^^^^^^^^^
On Debian and Ubuntu, install the python3-venv system package first.
On macOS and Linux, create a Python virtual environment and install
nodeenv with pip_::
$ python3 -m venv .venv
$ . .venv/bin/activate
(.venv) $ python -m pip install nodeenv
(.venv) $ nodeenv --version
If you already use virtualenv_, the environment it creates works as well.
The name .venv leaves env available for the Node.js environment
created in the Usage example below.
On Windows with the Python launcher installed, use cmd::
C:\> py -m venv .venv
C:\> .venv\Scripts\activate.bat
(.venv) C:\> python -m pip install nodeenv
(.venv) C:\> nodeenv --version
PowerShell's execution policy may block Activate.ps1. Activation is
optional; in PowerShell you can invoke the environment's executables
directly::
PS> py -m venv .venv
PS> .\.venv\Scripts\python.exe -m pip install nodeenv
PS> .\.venv\Scripts\nodeenv.exe --version
To run a source checkout, use the activated Python virtual environment
above and clone the GitHub repository_::
(.venv) $ git clone https://github.com/ekalinin/nodeenv.git
(.venv) $ python ./nodeenv/nodeenv.py --help
To install the latest development version in that activated environment, use an editable install (requires Git)::
(.venv) $ python -m pip install -e "git+https://github.com/ekalinin/nodeenv.git#egg=nodeenv"
In an unactivated PowerShell environment, use
.\.venv\Scripts\python.exe in place of python.
.. _repository: https://github.com/ekalinin/nodeenv .. _pip: https://pypi.org/project/pip/ .. _pipx: https://pipx.pypa.io/
Shell completion ^^^^^^^^^^^^^^^^
nodeenv --print-completion SHELL prints a completion script for bash,
zsh or fish. It needs shtab_, which the completion extra installs::
$ python -m pip install "nodeenv[completion]"
With pipx, add shtab to nodeenv's environment instead::
$ pipx inject nodeenv shtab
Then save the script where your shell loads it from.
bash::
$ mkdir -p ~/.local/share/bash_completion
$ nodeenv --print-completion bash > ~/.local/share/bash_completion/nodeenv
$ echo 'source ~/.local/share/bash_completion/nodeenv' >> ~/.bashrc
zsh, as _nodeenv in a directory on fpath::
$ mkdir -p ~/.zfunc
$ nodeenv --print-completion zsh > ~/.zfunc/_nodeenv
and in ~/.zshrc, before compinit runs::
fpath=(~/.zfunc $fpath)
Instead of the file, ~/.zshrc can run
eval "$(nodeenv --print-completion zsh)" after compinit, at the
cost of starting nodeenv in every new shell. Sourcing the script does not
work in zsh.
fish::
$ nodeenv --print-completion fish > ~/.config/fish/completions/nodeenv.fish
.. _shtab: https://pypi.org/project/shtab/
Dependency
For nodeenv ^^^^^^^^^^^
- Python 3.10 or later (CI tests CPython 3.10 through 3.14)
- make
- tail
For node.js ^^^^^^^^^^^
- libssl-dev
- Python 2.7 as a
python2command when building Node.js versions older than 13 from source; this is separate from the Python 3.10+ interpreter that runs nodeenv.
Usage
Basic ^^^^^
Create new environment::
$ nodeenv env
Activate new environment::
$ . env/bin/activate
On Windows the environment is created in env\Scripts instead, with a
script per shell: activate.bat for cmd, Activate.ps1 for
PowerShell and activate for posix shells such as git-bash::
$ . env/Scripts/activate
Check versions of main packages::
(env) $ node -v
v0.10.26
(env) $ npm -v
1.4.3
Deactivate environment::
(env) $ deactivate_node
Advanced ^^^^^^^^
Get available node.js versions::
$ nodeenv --list
0.0.1 0.0.2 0.0.3 0.0.4 0.0.5 0.0.6 0.1.0
0.1.2 0.1.3 0.1.4 0.1.5 0.1.6 0.1.7 0.1.8
0.1.10 0.1.11 0.1.12 0.1.13 0.1.14 0.1.15 0.1.16
0.1.18 0.1.19 0.1.20 0.1.21 0.1.22 0.1.23 0.1.24
0.1.26 0.1.27 0.1.28 0.1.29 0.1.30 0.1.31 0.1.32
0.1.90 0.1.91 0.1.92 0.1.93 0.1.94 0.1.95 0.1.96
0.1.98 0.1.99 0.1.100 0.1.101 0.1.102 0.1.103 0.1.104
0.2.1 0.2.2 0.2.3 0.2.4 0.2.5 0.2.6 0.3.0
0.3.2 0.3.3 0.3.4 0.3.5 0.3.6 0.3.7 0.3.8
0.4.1 0.4.2 0.4.3 0.4.4 0.4.5 0.4.6
Install node.js "0.4.3" without ssl support with 4 parallel commands for compilation and npm.js "0.3.17"::
$ nodeenv --without-ssl --node=0.4.3 --npm=0.3.17 --with-npm --jobs=4 env-4.3
Install node.js from the source::
$ nodeenv --node=0.10.25 --source env-0.10.25
Install node.js from a mirror::
$ nodeenv --node=10.19.0 --mirror=https://npm.taobao.org/mirrors/node
A local directory works as a mirror too, if it repeats the layout of
nodejs.org: packages in v<version>/ and, to resolve latest, lts
or a version range, an index.json next to them::
$ nodeenv --node=22.14.0 --mirror=file:///srv/node-mirror env-22
A mirror that asks for a login takes it in the URL, with special characters percent-encoded::
$ nodeenv --mirror=https://user:p%[email protected]/nodejs env
Install the highest node.js release matching a version range::
$ nodeenv --node=22 env-22
$ nodeenv --node=4.x env-4
$ nodeenv --node="^4.3.1" env-4.3
$ nodeenv --node=">=20 <22" env-20
Ranges use npm semver syntax_ and also work in a .node-version file.
.. _npm semver syntax: https://docs.npmjs.com/cli/v10/using-npm/semver
It's much faster to install from the prebuilt package than Install & compile node.js from source::
$ time nodeenv --node=0.10.25 --prebuilt env-0.10.25-prebuilt
+ Install node.js (0.10.25) ... done.
real 0m6.928s
user 0m0.408s
sys 0m1.144s
$ time nodeenv --node=0.10.25 --source env-0.10.25-src
+ Install node.js (0.10.25) ... done.
real 4m12.602s
user 6m34.112s
sys 0m30.524s
Create a new environment with the system-wide node.js::
$ nodeenv --node=system
Use the system-wide node.js if it is available, otherwise install the latest LTS release::
$ nodeenv --prefer-system --node=lts env
Saving the versions of all installed packages to a file::
$ . env-4.3/bin/activate
(env-4.3)$ npm install -g express
(env-4.3)$ npm install -g jade
(env-4.3)$ freeze ../prod-requirements.txt
If you want to list locally installed packages use -l option::
(env-4.3)$ freeze -l ../prod-requirements.txt
npm and corepack are installed by node.js itself and are left out of
the list: pinning them would downgrade the copies the next node.js brings.
freeze saves the packages, not the runtime. To pin the node.js version as
well, write it next to the requirements file - nodeenv reads
.node-version from the directory it is run in::
(env-4.3)$ node --version > ../.node-version
Create an environment from a requirements file::
$ nodeenv --requirements=../prod-requirements.txt --jobs=4 env-copy
--requirements may be given more than once, and the packages of every file
are installed globally::
$ nodeenv --requirements=../prod-requirements.txt \
--requirements=../dev-requirements.txt env-copy
To install packages locally, into node_modules of the current directory,
use --local-requirements. It accepts the output of freeze -l and may
also be given more than once::
$ nodeenv --requirements=../global-requirements.txt \
--local-requirements=../local-requirements.txt env-copy
Global packages are installed first, then the local ones.
Requirements files are plain text files that contain a list of packages to be installed. These text files allow you to create repeatable installations. Requirements file example::
$ cat ../prod-requirements.txt
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
If you already have the python virtualenv tool, and want to use nodeenv and virtualenv in conjunction, then you should create (or activate) the python virtual environment::
# in case of using virtualenv_wrapper
$ mkvirtualenv my_env
# in case of using virtualenv
$ . my_env/bin/activate
and add a node virtual environment to this existing new_venv::
$ nodeenv -p
If you need to set the path to make used to build node::
$ nodeenv -m /usr/local/bin/gmake ENV
That's all. Now, all your node.js modules will be installed into your virtual environment::
$ workon my_env
$ npm install -g coffee-script
$ command -v coffee
/home/monty/virtualenvs/my_env/bin/coffee
Creating a virtual environment with a custom prompt:
$ nodeenv --node=12.18.2 --prompt="(myenv)" nodeenv
If environment's directory already exists then you can use --force option::
$ nodeenv --requirements=requirements.txt --jobs=4 --force env
If you already have an environment and want to update packages from requirements
file you can use --update option::
$ . env-4.3/bin/activate
(env-4.3)$ nodeenv --requirements=requirements.txt --update env-4.3
If you want to call node from environment without activation then you should
use shim script::
$ ./env-4.3/bin/shim --version
v0.4.3
Command Line Options
Basic options ^^^^^^^^^^^^^
-n NODE_VER, --node=NODE_VER
The node.js version to use, e.g., --node=22.11.0. Also accepts an
npm-style semver range, which is resolved to the highest matching
release: --node=22, --node=4.x, --node="^4.3.1",
--node="~4.3", --node=">=20 <22", --node="8 || 10".
The default is the last stable version (latest). Use lts for the
latest LTS release. Use system to use system-wide node.
--prefer-system
Use the system-wide node.js if nodejs or node is found in
PATH, otherwise install the version given by --node. A found
system node is used as is, its version is not checked against
--node. Set prefer_system = True in ~/.nodeenvrc to make
this the default. Ignored on Windows, where system-wide node.js is not
supported.
-l, --list
Lists available node.js versions.
-p [VENV_DIR], --python-virtualenv [VENV_DIR]
Use the given python virtualenv, or the current one if no directory
is given. Passing a directory is required when nodeenv lives in its
own virtualenv (pipx, pipsi, uv tool) and the activated
virtualenv doesn't export VIRTUAL_ENV. Running it again with the
same node version does not reinstall node; pass --force to
reinstall.
-r FILENAME, --requirements=FILENAME
Install all the packages listed in the given requirements file globally.
May be given more than once.
--local-requirements=FILENAME
Install all the packages listed in the given requirements file locally,
into node_modules of the current directory. May be given more than
once.
--prompt=PROMPT
Provides an alternative prompt prefix for this environment.
--force
Force installation in a pre-existing directory, and reinstall node even
when the requested version is already installed.
--update
Install npm packages from file without reinstalling node.
Installation options ^^^^^^^^^^^^^^^^^^^^
--prebuilt
Install node.js from prebuilt package (default).
--source
Install node.js from the source (Unix only).
--mirror=URL
Set mirror server of nodejs.org to download from. A file:// URL
points nodeenv at a local directory instead of a server. The
user:password@ part of the URL goes to the mirror with HTTP Basic
authentication, and to no other host.
-c, --clean-src
Remove "src" directory after installation. This is the default.
--no-clean-src
Keep "src" directory after installation. With --source it holds the
downloaded source tree, so a repeated --force build reuses it.
--parallel-extract
Extract the node.js zip archive on Windows, Cygwin and MSYS 32 files at
a time, so that a security scanner that checks every new file does not
hold up the whole install. This is the default.
--no-parallel-extract
Extract the zip archive one file at a time. Set
parallel_extract = False in ~/.nodeenvrc to make this the default.
NPM options ^^^^^^^^^^^
--npm=NPM_VER
The npm version to use, e.g., --npm=10.0.0.
The default is the last available version (latest).
--with-npm
Install npm into the new virtual environment. Required for node.js < 0.6.3.
By default, the npm included with node.js is used.
--no-npm-clean
Skip the npm 0.x cleanup. Cleanup is enabled by default.
--isolate-npm
Keep npm's cache (.npm), userconfig (.npmrc) and
init-module (.npm-init.js) inside the environment instead of
$HOME. Useful when $HOME is missing or read-only, or when the
environment must not touch the user's npm files. Settings from
~/.npmrc such as a private registry or auth tokens are then not seen
inside the environment. Set isolate_npm = True in ~/.nodeenvrc to
make this the default. Ignored on Windows.
Compilation options (Unix only) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-j JOBS, --jobs=JOBS
Sets number of parallel commands at node.js compilation. The default is 2 jobs.
--load-average=LOAD
Sets maximum load average for executing parallel commands at node.js compilation.
-m MAKE_PATH, --make=MAKE_PATH
Path to make command.
--without-ssl
Build node.js without SSL support.
--debug
Build debug variant of the node.js.
--profile
Enable profiling for node.js.
Other options ^^^^^^^^^^^^^
-v, --verbose
Verbose mode.
-q, --quiet
Quiet mode.
-C CONFIG_FILE, --config-file=CONFIG_FILE
Load a different config file than ~/.nodeenvrc.
Pass an empty string for no config (use built-in defaults).
--ignore_ssl_certs
Ignore SSL certificates for package downloads. UNSAFE - use at your own risk.
--with-certifi
Use the certifi <https://pypi.org/project/certifi/>_ certificate bundle for
package downloads instead of the system certificate store. Useful when the
system store is missing or outdated. If certifi is not installed, a warning is
printed and the system store is used. Ignored when --ignore_ssl_certs is
given. The same result can be achieved without this option by pointing
SSL_CERT_FILE at the bundle::
$ SSL_CERT_FILE=$(python -c 'import certifi; print(certifi.where())') nodeenv env
--print-completion=SHELL
Print the completion script for bash, zsh or fish and
exit. Needs shtab, see Shell completion_.
--version
Show program version and exit.
Configuration
You can use the INI-style file ~/.nodeenvrc to set default values for many options,
the keys in that file are the long command-line option names.
These are the available options and their defaults::
[nodeenv]
node = 'latest'
npm = 'latest'
with_npm = False
jobs = '2'
without_ssl = False
debug = False
profile = False
make = 'make'
prebuilt = True
ignore_ssl_certs = False
with_certifi = False
mirror = None
prefer_system = False
isolate_npm = False
clean_src = True
parallel_extract = True
Alternatives
There are several alternatives that create isolated environments:
-
nave <https://github.com/isaacs/nave>_ - Virtual Environments for Node. Nave stores all environments in one directory~/.nave. Can create per node version environments usingnave use envname versionname. Can not pass additional arguments into configure (for example --without-ssl) Can't run on windows because it relies on a POSIX shell. -
nvm <https://github.com/creationix/nvm/blob/master/nvm.sh>_ - Node Version Manager. It is necessarily to donvm syncfor caching available node.js version. Can not pass additional arguments into configure (for example --without-ssl) -
virtualenv_ - Virtual Python Environment builder. For python only.
.. _virtualenv: https://github.com/pypa/virtualenv
Contributing
See CONTRIBUTING.md_ for how to set up nodeenv for development, which
checks a change has to pass, and how to send it.
.. _CONTRIBUTING.md:
https://github.com/ekalinin/nodeenv/blob/master/CONTRIBUTING.md
LICENSE
BSD / LICENSE <https://github.com/ekalinin/nodeenv/blob/master/LICENSE>_
Nodeenv changelog
Version 1.12.0
--print-completion SHELLprints a completion script for bash, zsh or fish. It needs shtab, installed withpip install "nodeenv[completion]"#351 <https://github.com/ekalinin/nodeenv/issues/351>_--prebuiltinstalls no longer fail when the environment path or the node.js version contains[,*or?#441 <https://github.com/ekalinin/nodeenv/issues/441>_- On Windows, Cygwin and MSYS the node.js zip archive is extracted 32 files
at a time instead of one by one, so a security scanner that checks every
new file no longer makes the install wait for each file in turn.
--no-parallel-extract, orparallel_extract = Falsein~/.nodeenvrc, extracts it one file at a time again#366 <https://github.com/ekalinin/nodeenv/issues/366>_ --prebuiltinstalls no longer mistake a cached source tree for a prebuilt archive, or fail when both trees remain insrc/#443 <https://github.com/ekalinin/nodeenv/issues/443>_activate.fishrestores the caller'sNODE_PATHand npm configuration on deactivation, including empty values and whenNODE_VIRTUAL_ENVhas been removed. Existing environments keep their oldactivate.fish; recreate them with the same options to get the fix. With-p, remove the old nodeenv part from the virtualenv'sactivate.fishfirst#399 <https://github.com/ekalinin/nodeenv/issues/399>_- A
%in a[nodeenv]config value, such as a percent-encoded mirror login, no longer crashes nodeenv: a value that can't be interpolated and has no%(name)sreference is read as written.%%still gives%, whichsetup.cfgneeds, as setuptools reads that file too#440 <https://github.com/ekalinin/nodeenv/issues/440>_ nodeenv -pno longer puts the python venv'sbindirectory onPATHa second time: the venv's ownactivateandactivate.fishput it there already. Envs without those scripts, such as conda envs, and the git-bashactivateon Windows keep it, and runningnodeenv -pagain fixes an existing venv#332 <https://github.com/ekalinin/nodeenv/issues/332>_- Require Python 3.10 or later, matching the minimum version tested in CI.
Update package classifiers and wheel tags, and remove the unused Python 2
compatibility paths. Old Node.js source builds still require Python 2.7
as their build interpreter
#436 <https://github.com/ekalinin/nodeenv/issues/436>_ --sourcebuilds of node.js 13 and later no longer need apython2command; 8.8 to 12.x still need one but pointpythonat it on their own, so thepythonto python2 link inPATHis only set up for older versions, and versions before 13 still fail early with a clear error whenpython2is missing#419 <https://github.com/ekalinin/nodeenv/issues/419>_- The node.js archive download also retries when the connection is reset or
times out in the middle of the body, pauses between the attempts and ends
with an error message instead of a traceback when all of them fail; a
server that stops answering is given up on after 60 seconds instead of
hanging nodeenv
#324 <https://github.com/ekalinin/nodeenv/issues/324>_ activate.fishno longer puts a literal^/dev/nullonPATH: fish 3.1+ defaults tostderr-nocaret, so the old caret redirect was one more path entry; existing environments keep the oldactivate.fishuntil recreated with--force#400 <https://github.com/ekalinin/nodeenv/issues/400>_activate.batandActivate.ps1now setnpm_config_prefixto the environment and restore it on deactivate:npxexports the outer prefix, andnpm.cmdruns the npm it finds there instead of its own#309 <https://github.com/ekalinin/nodeenv/issues/309>_--with-npmon Windows and Cygwin installs npm from the registry tarball instead of the GitHub source archive, whose workspace symlinks unpacked as text files (npm 8) and whose workspaces are missing (npm >= 9); the default--npm=latestno longer ends in a 404 there#310 <https://github.com/ekalinin/nodeenv/issues/310>_- Quoted values in the config file, as the README shows them, are read
without the quotes, and
user:password@in the--mirrorURL is sent to the mirror with HTTP Basic authentication instead of being taken for a part of the host; the password stays out of error messages and redirects#321 <https://github.com/ekalinin/nodeenv/issues/321>_
Version 1.11.1
latest, the default, and semver ranges such as--node=26no longer pick pre-releases: once nodejs.org listed27.0.0-alpha.0.0.0, both stopped with a traceback. An exact pre-release, such as--node=27.0.0-alpha.0.0.0, installs instead of crashing as well#453 <https://github.com/ekalinin/nodeenv/issues/453>_
Version 1.11.0
- Fixed zsh
source bin/activateaborting on the direct-call guard#398 <https://github.com/ekalinin/nodeenv/issues/398>_ - Added check for how
activateis called#384 <https://github.com/ekalinin/nodeenv/pull/384>_ - Addressed the
tarfile.extractalldeprecation on Python >= 3.12 by settingfilter='data', which also prevents writing files via ".." or absolute paths#380 <https://github.com/ekalinin/nodeenv/pull/380>_ - Added support for Solaris/illumos
#360 <https://github.com/ekalinin/nodeenv/issues/360>_ - Added
predeactivatehooks for Windows - Added error handling and tests for the node installation
#336 <https://github.com/ekalinin/nodeenv/issues/336>_ - Removed the leftover debug
printthat leaked a dict to stdout on every version detection#390 <https://github.com/ekalinin/nodeenv/issues/390>_ - Added
--with-certifito download packages with the certifi certificate bundle#388 <https://github.com/ekalinin/nodeenv/pull/388>_ --nodeaccepts npm-style semver ranges#393 <https://github.com/ekalinin/nodeenv/pull/393>_- Added
--prefer-systemto use system-wide node.js when available and install one otherwise#153 <https://github.com/ekalinin/nodeenv/issues/153>_ - Added
--isolate-npmto keep npm cache, userconfig and init-module inside the environment#154 <https://github.com/ekalinin/nodeenv/issues/154>_ - Added tests that run the activation scripts in sh, dash, bash, zsh and fish.
-pno longer reinstalls node when the requested version is already in the virtualenv#159 <https://github.com/ekalinin/nodeenv/issues/159>_- Repeated
-pruns no longer duplicate thepredeactivatehook#159 <https://github.com/ekalinin/nodeenv/issues/159>_ -paccepts an optional virtualenv directory and prefers the activatedVIRTUAL_ENVover the virtualenv nodeenv itself is installed in#156 <https://github.com/ekalinin/nodeenv/issues/156>_-r/--requirementsmay now be given more than once, and the new--local-requirementsinstalls the packages of a file locally, into "node_modules" of the current directory, which is whatfreeze -lwrites. Under npm < 1.0.0, which has no-g, a local file is still installed the old way#206 <https://github.com/ekalinin/nodeenv/issues/206>_- The "src" directory is now removed after installation by default, which
halves the size of an environment. Added
--no-clean-srcto keep it: with--sourcethat is what lets a repeated--forcebuild reuse the downloaded source tree#205 <https://github.com/ekalinin/nodeenv/issues/205>_ - Documented that
--mirrortakes afile://URL, so a local directory can serve as the download source#193 <https://github.com/ekalinin/nodeenv/issues/193>_ - The posix
activateis now written on Windows too, into "Scripts", so git-bash and the other posix shells there can activate an environment#226 <https://github.com/ekalinin/nodeenv/issues/226>_ - A download that reaches nothing at all, which a broken
http_proxyorhttps_proxyusually causes, now reports the url and the proxy settings instead of a traceback#229 <https://github.com/ekalinin/nodeenv/issues/229>_ - On Windows
-pextends "activate.bat", "deactivate.bat" and "Activate.ps1" of the python virtualenv instead of overwriting them, soVIRTUAL_ENVand the virtualenv's own deactivation survive#243 <https://github.com/ekalinin/nodeenv/issues/243>_ - A missing node.js archive now reports the urls that were tried and points
at
--listand--sourceinstead of a traceback#250 <https://github.com/ekalinin/nodeenv/issues/250>_ freezenow readsnpm ls --parseableinstead of the drawn tree: scoped packages keep their scope, a package whose name contains "npm" is no longer dropped, andnpmandcorepack, which come with node.js itself, are left out of the list. The fish version, which printed nothing at all under npm >= 1, now writes the same file as the posix one#287 <https://github.com/ekalinin/nodeenv/issues/287>_- musl is now detected whatever the vendor field of the host triplet says,
so Alpine's own python3 (
x86_64-alpine-linux-musl) gets the musl build of node.js instead of the glibc one#290 <https://github.com/ekalinin/nodeenv/issues/290>_ - On Windows "nodejs.exe" is linked with
os.symlink, falling back to a hard link, instead ofmklink, which broke on paths with forward slashes or spaces and needs elevation or Developer Mode. If both fail, only a warning is logged#303 <https://github.com/ekalinin/nodeenv/issues/303>_
Version 1.10.0
- Added support for Python 3.13
#367 <https://github.com/ekalinin/nodeenv/pull/367>_ - Added support for UV virtual environments
#386 <https://github.com/ekalinin/nodeenv/pull/386>_ - Used
shinstead ofbash#389 <https://github.com/ekalinin/nodeenv/pull/389>_ - Replaced the remaining
which(1)calls withshutil.which()#355 <https://github.com/ekalinin/nodeenv/pull/355>_ - Supported a leading
vin.node-version#359 <https://github.com/ekalinin/nodeenv/pull/359>_ - Checked the host platform when finding the
nodeversion#363 <https://github.com/ekalinin/nodeenv/pull/363>_ - Fixed
archmaplookup to be lowercase#382 <https://github.com/ekalinin/nodeenv/pull/382>_
Version 1.9.1
- Fixed version discovery
#358 <https://github.com/ekalinin/nodeenv/pull/358>_#356 <https://github.com/ekalinin/nodeenv/issues/356>_
Version 1.9.0
- Switched to
packagingfor version comparison#338 <https://github.com/ekalinin/nodeenv/pull/338>_ and then dropped the dependency in favor of a simple version-parsing function#352 <https://github.com/ekalinin/nodeenv/pull/352>_ - Fixed GitHub Actions
#347 <https://github.com/ekalinin/nodeenv/pull/347>_ - Added Python 3.11 and 3.12 test coverage
#348 <https://github.com/ekalinin/nodeenv/pull/348>_ - Added support for shells with "set -u"
#345 <https://github.com/ekalinin/nodeenv/pull/345>_ - Replaced
pipes.quotewithshlex.quoteon Python 3.3+#342 <https://github.com/ekalinin/nodeenv/pull/342>_ - Removed usage of the non-portable
which#346 <https://github.com/ekalinin/nodeenv/pull/346>_
Version 1.8.0
- Fixed the function name in
fish_prompt#312 <https://github.com/ekalinin/nodeenv/pull/312>_ - Added support for riscv64
#313 <https://github.com/ekalinin/nodeenv/pull/313>_ - Upgraded GitHub Actions
#317 <https://github.com/ekalinin/nodeenv/pull/317>_ - Made the
mockdependency optional#320 <https://github.com/ekalinin/nodeenv/pull/320>_ - GitHub Actions:
fail-fast: false#327 <https://github.com/ekalinin/nodeenv/pull/327>_ - Made multiple attempts to download the node.js archive (IncompleteRead error)
#329 <https://github.com/ekalinin/nodeenv/pull/329>_ - Logged the URL on download failures
#330 <https://github.com/ekalinin/nodeenv/pull/330>_
Version 1.7.0
- Dropped python3.4, python3.5 and python3.6
- Supported python releases before 3.7 in tests
#272 <https://github.com/ekalinin/nodeenv/pull/272>_ - Required setuptools in setup.py
#289 <https://github.com/ekalinin/nodeenv/pull/289>_ - Used the version specified in
.node-versionif it exists#288 <https://github.com/ekalinin/nodeenv/pull/288>_ - Fixed the problem when used with fish and virtualenv
#294 <https://github.com/ekalinin/nodeenv/pull/294>_ - Replaced optparse with argparse
#295 <https://github.com/ekalinin/nodeenv/pull/295>_ - Set the SSL protocol when ssl certs are ignored
#296 <https://github.com/ekalinin/nodeenv/issues/296>_ - Fixed tests, tested Python 3.10 and moved tests to GitHub Actions
#298 <https://github.com/ekalinin/nodeenv/pull/298>_ - Patched node installation for M1
#299 <https://github.com/ekalinin/nodeenv/pull/299>_ - Added ability to configure the mirror through the settings file
#307 <https://github.com/ekalinin/nodeenv/pull/307>_ - Added
--with-npmto README#308 <https://github.com/ekalinin/nodeenv/pull/308>_
Version 1.6.0
- Tested for
nodejsornodein tests#270 <https://github.com/ekalinin/nodeenv/pull/270>_ - Removed the main node.js mirror in tests if musl
#271 <https://github.com/ekalinin/nodeenv/pull/271>_ - Fixed the nodeenv prompt when using Fish
#273 <https://github.com/ekalinin/nodeenv/pull/273>_ - Used
nodeinstead ofnodejs#275 <https://github.com/ekalinin/nodeenv/pull/275>_ - Fixed typo, remaning -> remaining
#276 <https://github.com/ekalinin/nodeenv/pull/276>_ - Resolved the venv dir for Fish
#277 <https://github.com/ekalinin/nodeenv/pull/277>_ - Added support for installing the latest LTS release
#281 <https://github.com/ekalinin/nodeenv/pull/281>_ - Created a broad mapping for M1
#282 <https://github.com/ekalinin/nodeenv/pull/282>_
Version 1.5.0
- Improved quoting of variables in the node shim for
-n system#259 <https://github.com/ekalinin/nodeenv/pull/259>_ - Added
--ignore_ssl_certsto ignore SSL certs for MITM/firewalls#256 <https://github.com/ekalinin/nodeenv/pull/256>_ - Added support for MSYS2
#263 <https://github.com/ekalinin/nodeenv/pull/263>_ - Added missing arch's (ppc64le, armv8l, s390x)
#268 <https://github.com/ekalinin/nodeenv/pull/268>_
Version 1.4.0
- Switched to
/download/release/index.jsonto discover versions - Dropped io.js support
- Worked around IncompleteRead when downloading src
#258 <https://github.com/ekalinin/nodeenv/pull/258>_ - Fixed erasing of NODE_VIRTUAL_ENV while
deactivate_nodein fish#255 <https://github.com/ekalinin/nodeenv/pull/255>_ - Accepted a URL as well as a domain name for the
--mirrorargument#252 <https://github.com/ekalinin/nodeenv/pull/252>_ - Downloaded musl-compatible node from unofficial-builds
#247 <https://github.com/ekalinin/nodeenv/pull/247>_
Version 1.3.5
- Fixed error 183 ("already exists") on Windows when installing prebuilt node
#249 <https://github.com/ekalinin/nodeenv/issues/249>_
Version 1.3.4
- Used the prebuilt windows zip which contains npm
#230 <https://github.com/ekalinin/nodeenv/pull/230>_ - Fixed url in the CHANGES file
#231 <https://github.com/ekalinin/nodeenv/pull/231>_ - Fixed escape sequences
#232 <https://github.com/ekalinin/nodeenv/pull/232>_ - Fixed
npm_urlininstall_npm_win#233 <https://github.com/ekalinin/nodeenv/pull/233>_ - Changed the URL for downloading npm in Cygwin
#234 <https://github.com/ekalinin/nodeenv/pull/234>_ - Fixed nodeenv in case python4 is ever a thing
#241 <https://github.com/ekalinin/nodeenv/pull/241>_ - Produced py2.py3 wheels, nodeenv is a pure python package
#242 <https://github.com/ekalinin/nodeenv/pull/242>_ - Printed a blank line when
install_nodefails#236 <https://github.com/ekalinin/nodeenv/pull/236>_ - Added an option to set your own mirror
#208 <https://github.com/ekalinin/nodeenv/pull/208>_ - Fixed CI (flake8 errors)
#245 <https://github.com/ekalinin/nodeenv/pull/245>_ - Fixed call to
logger.info(...)#246 <https://github.com/ekalinin/nodeenv/pull/246>_
Version 1.3.3
- Installed a certain npm version via
npm install#225 <https://github.com/ekalinin/nodeenv/issues/225>_
Version 1.3.2
- Updated node/node -> node/cli
#222 <https://github.com/ekalinin/nodeenv/pull/222>_ - Fixed arch detection on FreeBSD, which returns amd64
#216 <https://github.com/ekalinin/nodeenv/pull/216>_ - Added a space before the normal $PS1
#213 <https://github.com/ekalinin/nodeenv/pull/213>_ - Dropped py33 support
Version 1.3.1
- Windows related fix
#207 <https://github.com/ekalinin/nodeenv/pull/207>_ - Fixed url for arm64
#210 <https://github.com/ekalinin/nodeenv/pull/210>_ - Fixed fish support
#212 <https://github.com/ekalinin/nodeenv/pull/212>_
Version 1.3.0
- Fixed symlink creation
#189 <https://github.com/ekalinin/nodeenv/issues/189>_ - Python3.6 support
#200 <https://github.com/ekalinin/nodeenv/pull/200>_ - Added
activatefor fish#201 <https://github.com/ekalinin/nodeenv/pull/201>_ - Fixed cp866
#202 <https://github.com/ekalinin/nodeenv/pull/202>_ - Added Conda support
#203 <https://github.com/ekalinin/nodeenv/pull/203>_
Version 1.2.0
- Support for Cygwin
#194 <https://github.com/ekalinin/nodeenv/pull/194>_#195 <https://github.com/ekalinin/nodeenv/pull/195>_ - tox.ini as default configuration file
#197 <https://github.com/ekalinin/nodeenv/pull/197>_
Version 1.1.4
- Fixed directory copy
#188 <https://github.com/ekalinin/nodeenv/issues/188>_
Version 1.1.3
- Fixed spaces in paths
#187 <https://github.com/ekalinin/nodeenv/issues/187>_
Version 1.1.2
- Fixed MANIFEST.in
#184 <https://github.com/ekalinin/nodeenv/issues/184>_
Version 1.1.1
- Improve Windows support. See
#181 <https://github.com/ekalinin/nodeenv/pull/181>_ - Fix bug when downgrading using
--force. See#183 <https://github.com/ekalinin/nodeenv/pull/183>_ - Environment creation fails with non-ASCII chars in path. See
#49 <https://github.com/ekalinin/nodeenv/issues/49>_
Version 1.1.0
- Windows support
Version 1.0.0
--prebuiltis default. See# 161_- Added
--sourceoption - Added support for the
ARM. See# 171_ - Fixed issue with
$PATH. See# 86_
.. _# 171: https://github.com/ekalinin/nodeenv/issues/171 .. _# 161: https://github.com/ekalinin/nodeenv/issues/161 .. _# 86: https://github.com/ekalinin/nodeenv/issues/86
Version 0.13.6
- Use https for nodejs.org. See
# 129_
.. _# 129: https://github.com/ekalinin/nodeenv/issues/129
Version 0.13.5
- Improved user-agent identification
Version 0.13.4
- Custom
user-agent. See# 125,# 127
.. _# 125: https://github.com/ekalinin/nodeenv/issues/125 .. _# 127: https://github.com/ekalinin/nodeenv/issues/127
Version 0.13.3
- Fixed env creation with non-ASCII chars in path. See
# 49_ - Fixed logging with unicode chars. See
# 96_ - Skip new lines at the end of requirements.txt. See
# 122_ - Fixed UnicodeDecodeError at build on non UTF-8 environment. See
# 124_
.. _# 49: https://github.com/ekalinin/nodeenv/issues/49 .. _# 96: https://github.com/ekalinin/nodeenv/issues/96 .. _# 122: https://github.com/ekalinin/nodeenv/issues/122 .. _# 124: https://github.com/ekalinin/nodeenv/pull/124
Version 0.13.2
- Fixed
freezecommand. See# 121_
.. _# 121: https://github.com/ekalinin/nodeenv/issues/121
Version 0.13.1
- Fixed bug:
nodeenv --list is raising TypeError. See# 117,# 118
.. _# 117: https://github.com/ekalinin/nodeenv/issues/117 .. _# 118: https://github.com/ekalinin/nodeenv/pull/118
Version 0.13.0
- Removed deps from
sort,egrep,curl,tar. See# 114,# 116.
.. _# 114: https://github.com/ekalinin/nodeenv/pull/114 .. _# 116: https://github.com/ekalinin/nodeenv/pull/116
Version 0.12.3
- Fixed check for installed curl/tar/etc for py3.
Version 0.12.2
- Added check for installed curl/egrep/sort/tar. See
# 110,# 61
.. _# 110: https://github.com/ekalinin/nodeenv/issues/110 .. _# 61: https://github.com/ekalinin/nodeenv/issues/61
Version 0.12.1
- Removed dep for lxml in favor of stdlib HTMLParser. See
# 109_ - Added integration with travis-ci. See
# 109_ - Added some tests. See
# 109_
.. _# 109: https://github.com/ekalinin/nodeenv/pull/109
Version 0.12.0
- Added support for io.js (new option
--iojs) - Fixed
get_last_stable_node_versionfor python3
Version 0.11.1
- Disallow prefix overridden by .npmrc. See
# 98,# 100,# 103_
.. _# 98: https://github.com/ekalinin/nodeenv/issue/98 .. _# 100: https://github.com/ekalinin/nodeenv/pull/100 .. _# 103: https://github.com/ekalinin/nodeenv/pull/103
Version 0.11.0
- Improved dpkg rules. See
# 90_ - Added --config-file option. See
# 91_ - Read "./setup.cfg" in addition to "~/.nodeenvrc" by default. See
# 91_ - Python3 compatibility. See
# 92,# 93
.. _# 90: https://github.com/ekalinin/nodeenv/pull/90 .. _# 91: https://github.com/ekalinin/nodeenv/pull/91 .. _# 92: https://github.com/ekalinin/nodeenv/pull/92 .. _# 93: https://github.com/ekalinin/nodeenv/pull/93
Version 0.10.0
- Added support for config file. See
# 85_ - Using of virtualenv detected via python not env variable. See
# 87_ - Fixed
freezefor zsh. See# 88_ - Added
nodejssymlink creation. See# 84_
.. _# 85: https://github.com/ekalinin/nodeenv/pull/85 .. _# 87: https://github.com/ekalinin/nodeenv/pull/87 .. _# 88: https://github.com/ekalinin/nodeenv/pull/88
Version 0.9.6
- Removed
os.symlinkadded in# 76. See# 84
.. _# 84: https://github.com/ekalinin/nodeenv/issues/84
Version 0.9.5
- Fixed a few spelling typos in README. See
# 74_ - Fixed example of using --update option in README. See
# 74_ - Improved args passing into shim script. See
# 75_ - Try to find
nodejsif used system-wide node as well. See# 76_ - Added
assertif used system-wide node and it wasnt found. See# 76_ - Added
-loption intofreezecommand. See# 71_
.. _# 71: https://github.com/ekalinin/nodeenv/issues/71 .. _# 74: https://github.com/ekalinin/nodeenv/issues/74 .. _# 75: https://github.com/ekalinin/nodeenv/pull/75 .. _# 76: https://github.com/ekalinin/nodeenv/pull/76
Version 0.9.4
- Fixed support for python2.6. See
# 70_
.. _# 70: https://github.com/ekalinin/nodeenv/issues/70
Version 0.9.3
- Fixed npm when using prebuilt binaries on Mac OS X. See
# 68_ - Fixed using
systemnode under python3.4. See# 43_ - If used
systemnode scriptbin/nodealways overwritten
.. _# 68: https://github.com/ekalinin/nodeenv/issues/68 .. _# 43: https://github.com/ekalinin/nodeenv/issues/43
Version 0.9.2
- Fixed infinite loop when system-wide node used. See
# 67_
.. _# 67: https://github.com/ekalinin/nodeenv/issues/67
Version 0.9.1
- Fixed 'shim' script if used system-wide node
- Fixed shebang in the 'shim'
- Added shim with name 'node' in case of using system-wide node
Version 0.9.0
- Added
shimscript. See# 59_
.. _# 59: https://github.com/ekalinin/nodeenv/issues/59
Version 0.8.2
- Fixed prebuilt installation:
- cp more choosy. See
# 64_ - exclude top-level files in prebuilt tar. See
# 63_
- cp more choosy. See
.. _# 63: https://github.com/ekalinin/nodeenv/issues/63 .. _# 64: https://github.com/ekalinin/nodeenv/issues/64
Version 0.8.1
- Fixed system's node usage. See
# 62_
.. _# 62: https://github.com/ekalinin/nodeenv/pull/62
Version 0.8.0
- Added support for prebuilt packages. See
# 56_ - Added support for python3. See
# 42_
.. _# 56: https://github.com/ekalinin/nodeenv/issues/56 .. _# 42: https://github.com/ekalinin/nodeenv/issues/42
Version 0.7.3
- Fixed npm.js redirect. See
# 52_ - Added
--updateoption. See# 25_
.. _# 52: https://github.com/ekalinin/nodeenv/pull/52 .. _# 25: https://github.com/ekalinin/nodeenv/issues/25
Version 0.7.2
- Bug fixing in
freeze. See# 47_
.. _# 47: https://github.com/ekalinin/nodeenv/issues/47
Version 0.7.1
- Added
--makeoption
Version 0.7.0
- added
--force. See# 37_ - python3 support (first steps). See
# 38,# 39 - escaping all directories used by subprocesses. See
# 40_ - added an option to use system-wide node. See
# 41_
.. _# 37: https://github.com/ekalinin/nodeenv/pull/37 .. _# 38: https://github.com/ekalinin/nodeenv/issues/38 .. _# 39: https://github.com/ekalinin/nodeenv/issues/39 .. _# 40: https://github.com/ekalinin/nodeenv/pull/40 .. _# 41: https://github.com/ekalinin/nodeenv/pull/41
Version 0.6.6
- Fixed incomplete package names using freeze. See
# 35_ - Fixed packages installation type in README. See
# 33_
.. _# 33: https://github.com/ekalinin/nodeenv/issues/33 .. _# 35: https://github.com/ekalinin/nodeenv/pull/35
Version 0.6.5
- Node's source not loaded if it already exists in FS.
Version 0.6.4
- Added python3 compatibility. See
# 32_
.. _# 32: https://github.com/ekalinin/nodeenv/pull/32
Version 0.6.3
- Fixed
nodeenv -p. Seeissue # 31_
.. _issue # 31: https://github.com/ekalinin/nodeenv/issues/31
Version 0.6.2
- Skipped stand-alone npm installation by default. See
pull # 30_ --without-npmhas been changed to--with-npm. Seepull # 30_- Fixed options for running Make instances in parallel. See
pull # 30_
.. _pull # 30: https://github.com/ekalinin/nodeenv/pull/30
Version 0.6.1
- Used pkg_resources.parse_version to compare versions. See
pull # 29_ - Fixed doubling prompt inside a virtualenv. See
issues # 26_
.. _pull # 29: https://github.com/ekalinin/nodeenv/pull/29 .. _issues # 26: https://github.com/ekalinin/nodeenv/issues/26
Version 0.6.0
- Fixed typo in deactive command. See
pull # 20_ - Not used "--insecure" to download npm. See
pull # 21_ - Removed "src" directory after installation. See
pull # 22_ - Added option "--clean-src"
- Added integration with python's virtualenv. See
pull # 23_
.. _pull # 20: https://github.com/ekalinin/nodeenv/pull/20 .. _pull # 21: https://github.com/ekalinin/nodeenv/pull/21 .. _pull # 22: https://github.com/ekalinin/nodeenv/pull/22 .. _pull # 23: https://github.com/ekalinin/nodeenv/pull/23
Version 0.5.3
- Bug fix. Used https, /dist/latest/. See
pull # 16_
.. _pull # 16: https://github.com/ekalinin/nodeenv/pull/16
Version 0.5.2
- Improved installation logic for release candidate versions. See
pull # 10_
.. _pull # 10: https://github.com/ekalinin/nodeenv/pull/10
Version 0.5.1
- Improved logic for the option '--without-npm'. See
issue # 14,pull # 15
.. _issue # 14: https://github.com/ekalinin/nodeenv/issues/14 .. _pull # 15: https://github.com/ekalinin/nodeenv/pull/15
Version 0.5.0
- The virtual environment's path is no longer hardcoded into the
activation script. See
pull # 13_
.. _pull # 13: https://github.com/ekalinin/nodeenv/pull/13
Version 0.4.3
- Fixed metavar for
--npm npm install -gused for npm >=1.0, not noly forlatest
Version 0.4.2
- Added README.ru.rst
Version 0.4.1
- Fixed bug in print_node_versions. See
pull # 11_ - Added deps in README
.. _pull # 11: https://github.com/ekalinin/nodeenv/pull/11
Version 0.4.0
- Compatibility with virtualenv (renamed deactivate to deactivate_node).
See
pull # 9,issue # 6
.. _pull # 9: https://github.com/ekalinin/nodeenv/pull/9 .. _issue # 6: https://github.com/ekalinin/nodeenv/issues/6
Version 0.3.10
- Fixed bug in url detection for node.js download
Version 0.3.9
- Deleted notify method calls. See
pull # 7_ - Updated tar url for node.js > 0.5.0. See
pull # 8_
.. _pull # 7: https://github.com/ekalinin/nodeenv/pull/7 .. _pull # 8: https://github.com/ekalinin/nodeenv/pull/8
Version 0.3.8
- Added
NODE_PATHvariable export (for correct module search after installation via npm)
Version 0.3.7
- Shows command output when error occurs
- Excluded 'npm' from
freezelist - Fixed bug with 'not only letter' names in
freezelist - Added global installation for npm >= 1.0 (when install soft from requirement file)
Version 0.3.6
- Fixed
freezeoutput command. Seerequest # 5_ - Diagnostic message fixed. See
pull # 4_
.. _request # 5 : https://github.com/ekalinin/nodeenv/issues/5 .. _pull # 4 : https://github.com/ekalinin/nodeenv/pull/4
Version 0.3.5
- Added option
--npmto install certain npm.js version. Request_ . - Fixed
freezecommand for npm >= 1.0.x.
.. _Request: https://github.com/ekalinin/nodeenv/issues/3
Version 0.3.4
- Fixed
problem #2_ with new npm installation script. Added--no-npm-cleanoption. The default to the npm 0.x cleanup.
.. _problem #2: https://github.com/ekalinin/nodeenv/issues/2
Version 0.3.3
- Fixed
problem #1_ with installation from PyPI via easy_install. AddedMANIFEST.infile.
.. _problem #1: https://github.com/ekalinin/nodeenv/issues/1
Version 0.3.2
- Internal improvements
- Logging refactoring
Version 0.3.1
- Default environment promt is folder name
Version 0.3.0
- Renamed nve to nodeenv