Hello,
I am not sure if this is an actual issue or not, but i just did a re-format of my computer (Windows 10) and proceeded as normal with the install of Ubuntu Bash.
This is pretty much a stock install of Windows 10 with Ubuntu Bash where NVM and the latest LTS version of Node is installed. For some reason, then NVM is adding up to a minute extra load when opening Bash the first time. It always takes more then 30 seconds but usually close to a minute.
This wasnt a problem at all before the re-format, opening Ubuntu Bash made it available for commands within a second or two, now it's unbearable with a minute wait time before i can use the command line. Tho, i do not remember if i had installed NodeJS trough NVM before the re-format (It is unlikely and i most likely did a apt-get install nodejs).
Removing nvm.sh puts me right back on "instantly available" when Bash is opened.
Similar if not identical to #1277, they talk seconds, while my issue is minutes. Which make me believe that something is fundementally wrong on my end.
How did you install nvm? What's nvm debug print out?
Also, which profile files do you have present, and do more than one of them refer to nvm?
Hello,
Thank you for the reply.
I installed NVM the README way using curl.
This is from .bash_history (Which i didn't even knew i had :P)
apt-get install build-essential libssl-dev
curl https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
nvm -ls-remote --lts
nvm ls-remote lts
nvm ls-remote --lts
nvm install v6.10.2
node -v
npm
My home folder consists of .nvm .npm .bashrc .profile and the only reference to NVM in .bashrc or .profile is in .bashrc with
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm debug
nvm --version: v0.33.1
$SHELL: /bin/bash
$HOME: /root
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
$NVM_NODEJS_ORG_MIRROR: 'https://nodejs.org/dist'
$NVM_IOJS_ORG_MIRROR: 'https://iojs.org/dist'
nvm current: v6.10.2
which node: $NVM_DIR/versions/node/v6.10.2/bin/node
which iojs:
which npm: $NVM_DIR/versions/node/v6.10.2/bin/npm
npm config get prefix: $NVM_DIR/versions/node/v6.10.2
npm root -g: $NVM_DIR/versions/node/v6.10.2/lib/node_modules
@fjeddy try to use --no-use when loading?
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" --no-use # This loads nvm
Hello @PeterDaveHello
Thank you for the response. That change puts me back on track with "instant" access to Ubuntu Bash on start. But node isn't loaded?
@fjeddy yes, AFAIK the slow part is nvm use, in different environment will cause different delay, this can help you speed up the shell start up, you can just use nvm use to load the version you want when you really need it.
This doesn't solve the issue tho, it's merely a workaround, for me, not a good one, as i work mostly with node. It would just have to enter the command manually all the time and it's just as slow.
@fjeddy when you're actually using node, what does time npm config get prefix say?
FYI, on my DigitalOcean server:
$ time npm config get prefix
/home/peter/.nvm/versions/node/v4.8.2
real 0m1.183s
user 0m1.076s
sys 0m0.172s
Sorry, eastern holliday.
/root/.nvm/versions/node/v6.10.2
real 0m5.470s
user 0m1.578s
sys 0m1.969s
Not entirely sure what you mean by "using", no Node app is running when this is executed, just node itself.
@fjeddy right, i mean when nvm current prints out a version that's not "system", what does that say (it seems like your output covers that)
5s is slow, but shouldn't be adding 60 seconds of time.
I'm wondering if the usual suspects of slow things won't apply here, because you're using windows. What does set -x; time nvm use print out? (it will be long)
root@DESKTOP-UFHJF3C:~# set -x; time nvm use
+ nvm use
+ '[' 1 -lt 1 ']'
+ local COMMAND
+ COMMAND=use
+ shift
+ local VERSION
+ local ADDITIONAL_PARAMETERS
+ case $COMMAND in
+ local PROVIDED_VERSION
+ local NVM_USE_SILENT
+ NVM_USE_SILENT=0
+ local NVM_DELETE_PREFIX
+ NVM_DELETE_PREFIX=0
+ local NVM_LTS
+ '[' 0 -ne 0 ']'
+ '[' -n '' ']'
+ '[' -z '' ']'
+ nvm_rc_version
+ export NVM_RC_VERSION=
+ NVM_RC_VERSION=
+ local NVMRC_PATH
++ nvm_find_nvmrc
++ local dir
+++ nvm_find_up .nvmrc
+++ local path
+++ path=/root
+++ '[' /root '!=' '' ']'
+++ '[' '!' -f /root/.nvmrc ']'
+++ path=
+++ '[' '' '!=' '' ']'
+++ nvm_echo ''
+++ command printf '%s\n' ''
++ dir=
++ '[' -e /.nvmrc ']'
+ NVMRC_PATH=
+ '[' -e '' ']'
+ nvm_err 'No .nvmrc file found'
+ nvm_echo 'No .nvmrc file found'
+ command printf '%s\n' 'No .nvmrc file found'
No .nvmrc file found
+ return 1
+ '[' -n '' ']'
+ unset NVM_RC_VERSION
+ '[' -z '' ']'
+ nvm --help
+ '[' 1 -lt 1 ']'
+ local COMMAND
+ COMMAND=--help
+ shift
+ local VERSION
+ local ADDITIONAL_PARAMETERS
+ case $COMMAND in
+ local NVM_IOJS_PREFIX
++ nvm_iojs_prefix
++ nvm_echo iojs
++ command printf '%s\n' iojs
+ NVM_IOJS_PREFIX=iojs
+ local NVM_NODE_PREFIX
++ nvm_node_prefix
++ nvm_echo node
++ command printf '%s\n' node
+ NVM_NODE_PREFIX=node
+ nvm_echo
+ command printf '%s\n' ''
+ nvm_echo 'Node Version Manager'
+ command printf '%s\n' 'Node Version Manager'
Node Version Manager
+ nvm_echo
+ command printf '%s\n' ''
+ nvm_echo 'Note: <version> refers to any version-like string nvm understands. This includes:'
+ command printf '%s\n' 'Note: <version> refers to any version-like string nvm understands. This includes:'
Note: <version> refers to any version-like string nvm understands. This includes:
+ nvm_echo ' - full or partial version numbers, starting with an optional "v" (0.10, v0.1.2, v1)'
+ command printf '%s\n' ' - full or partial version numbers, starting with an optional "v" (0.10, v0.1.2, v1)'
- full or partial version numbers, starting with an optional "v" (0.10, v0.1.2, v1)
+ nvm_echo ' - default (built-in) aliases: node, stable, unstable, iojs, system'
+ command printf '%s\n' ' - default (built-in) aliases: node, stable, unstable, iojs, system'
- default (built-in) aliases: node, stable, unstable, iojs, system
+ nvm_echo ' - custom aliases you define with `nvm alias foo`'
+ command printf '%s\n' ' - custom aliases you define with `nvm alias foo`'
- custom aliases you define with `nvm alias foo`
+ nvm_echo
+ command printf '%s\n' ''
+ nvm_echo ' Any options that produce colorized output should respect the `--no-colors` option.'
+ command printf '%s\n' ' Any options that produce colorized output should respect the `--no-colors` option.'
Any options that produce colorized output should respect the `--no-colors` option.
+ nvm_echo
+ command printf '%s\n' ''
+ nvm_echo Usage:
+ command printf '%s\n' Usage:
Usage:
+ nvm_echo ' nvm --help Show this message'
+ command printf '%s\n' ' nvm --help Show this message'
nvm --help Show this message
+ nvm_echo ' nvm --version Print out the latest released version of nvm'
+ command printf '%s\n' ' nvm --version Print out the latest released version of nvm'
nvm --version Print out the latest released version of nvm
+ nvm_echo ' nvm install [-s] <version> Download and install a <version>, [-s] from source. Uses .nvmrc if available'
+ command printf '%s\n' ' nvm install [-s] <version> Download and install a <version>, [-s] from source. Uses .nvmrc if available'
nvm install [-s] <version> Download and install a <version>, [-s] from source. Uses .nvmrc if available
+ nvm_echo ' --reinstall-packages-from=<version> When installing, reinstall packages installed in <node|iojs|node version number>'
+ command printf '%s\n' ' --reinstall-packages-from=<version> When installing, reinstall packages installed in <node|iojs|node version number>'
--reinstall-packages-from=<version> When installing, reinstall packages installed in <node|iojs|node version number>
+ nvm_echo ' --lts When installing, only select from LTS (long-term support) versions'
+ command printf '%s\n' ' --lts When installing, only select from LTS (long-term support) versions'
--lts When installing, only select from LTS (long-term support) versions
+ nvm_echo ' --lts=<LTS name> When installing, only select from versions for a specific LTS line'
+ command printf '%s\n' ' --lts=<LTS name> When installing, only select from versions for a specific LTS line'
--lts=<LTS name> When installing, only select from versions for a specific LTS line
+ nvm_echo ' nvm uninstall <version> Uninstall a version'
+ command printf '%s\n' ' nvm uninstall <version> Uninstall a version'
nvm uninstall <version> Uninstall a version
+ nvm_echo ' nvm uninstall --lts Uninstall using automatic LTS (long-term support) alias `lts/*`, if available.'
+ command printf '%s\n' ' nvm uninstall --lts Uninstall using automatic LTS (long-term support) alias `lts/*`, if available.'
nvm uninstall --lts Uninstall using automatic LTS (long-term support) alias `lts/*`, if available.
+ nvm_echo ' nvm uninstall --lts=<LTS name> Uninstall using automatic alias for provided LTS line, if available.'
+ command printf '%s\n' ' nvm uninstall --lts=<LTS name> Uninstall using automatic alias for provided LTS line, if available.'
nvm uninstall --lts=<LTS name> Uninstall using automatic alias for provided LTS line, if available.
+ nvm_echo ' nvm use [--silent] <version> Modify PATH to use <version>. Uses .nvmrc if available'
+ command printf '%s\n' ' nvm use [--silent] <version> Modify PATH to use <version>. Uses .nvmrc if available'
nvm use [--silent] <version> Modify PATH to use <version>. Uses .nvmrc if available
+ nvm_echo ' --lts Uses automatic LTS (long-term support) alias `lts/*`, if available.'
+ command printf '%s\n' ' --lts Uses automatic LTS (long-term support) alias `lts/*`, if available.'
--lts Uses automatic LTS (long-term support) alias `lts/*`, if available.
+ nvm_echo ' --lts=<LTS name> Uses automatic alias for provided LTS line, if available.'
+ command printf '%s\n' ' --lts=<LTS name> Uses automatic alias for provided LTS line, if available.'
--lts=<LTS name> Uses automatic alias for provided LTS line, if available.
+ nvm_echo ' nvm exec [--silent] <version> [<command>] Run <command> on <version>. Uses .nvmrc if available'
+ command printf '%s\n' ' nvm exec [--silent] <version> [<command>] Run <command> on <version>. Uses .nvmrc if available'
nvm exec [--silent] <version> [<command>] Run <command> on <version>. Uses .nvmrc if available
+ nvm_echo ' --lts Uses automatic LTS (long-term support) alias `lts/*`, if available.'
+ command printf '%s\n' ' --lts Uses automatic LTS (long-term support) alias `lts/*`, if available.'
--lts Uses automatic LTS (long-term support) alias `lts/*`, if available.
+ nvm_echo ' --lts=<LTS name> Uses automatic alias for provided LTS line, if available.'
+ command printf '%s\n' ' --lts=<LTS name> Uses automatic alias for provided LTS line, if available.'
--lts=<LTS name> Uses automatic alias for provided LTS line, if available.
+ nvm_echo ' nvm run [--silent] <version> [<args>] Run `node` on <version> with <args> as arguments. Uses .nvmrc if available'
+ command printf '%s\n' ' nvm run [--silent] <version> [<args>] Run `node` on <version> with <args> as arguments. Uses .nvmrc if available'
nvm run [--silent] <version> [<args>] Run `node` on <version> with <args> as arguments. Uses .nvmrc if available
+ nvm_echo ' --lts Uses automatic LTS (long-term support) alias `lts/*`, if available.'
+ command printf '%s\n' ' --lts Uses automatic LTS (long-term support) alias `lts/*`, if available.'
--lts Uses automatic LTS (long-term support) alias `lts/*`, if available.
+ nvm_echo ' --lts=<LTS name> Uses automatic alias for provided LTS line, if available.'
+ command printf '%s\n' ' --lts=<LTS name> Uses automatic alias for provided LTS line, if available.'
--lts=<LTS name> Uses automatic alias for provided LTS line, if available.
+ nvm_echo ' nvm current Display currently activated version'
+ command printf '%s\n' ' nvm current Display currently activated version'
nvm current Display currently activated version
+ nvm_echo ' nvm ls List installed versions'
+ command printf '%s\n' ' nvm ls List installed versions'
nvm ls List installed versions
+ nvm_echo ' nvm ls <version> List versions matching a given <version>'
+ command printf '%s\n' ' nvm ls <version> List versions matching a given <version>'
nvm ls <version> List versions matching a given <version>
+ nvm_echo ' nvm ls-remote List remote versions available for install'
+ command printf '%s\n' ' nvm ls-remote List remote versions available for install'
nvm ls-remote List remote versions available for install
+ nvm_echo ' --lts When listing, only show LTS (long-term support) versions'
+ command printf '%s\n' ' --lts When listing, only show LTS (long-term support) versions'
--lts When listing, only show LTS (long-term support) versions
+ nvm_echo ' nvm ls-remote <version> List remote versions available for install, matching a given <version>'
+ command printf '%s\n' ' nvm ls-remote <version> List remote versions available for install, matching a given <version>'
nvm ls-remote <version> List remote versions available for install, matching a given <version>
+ nvm_echo ' --lts When listing, only show LTS (long-term support) versions'
+ command printf '%s\n' ' --lts When listing, only show LTS (long-term support) versions'
--lts When listing, only show LTS (long-term support) versions
+ nvm_echo ' --lts=<LTS name> When listing, only show versions for a specific LTS line'
+ command printf '%s\n' ' --lts=<LTS name> When listing, only show versions for a specific LTS line'
--lts=<LTS name> When listing, only show versions for a specific LTS line
+ nvm_echo ' nvm version <version> Resolve the given description to a single local version'
+ command printf '%s\n' ' nvm version <version> Resolve the given description to a single local version'
nvm version <version> Resolve the given description to a single local version
+ nvm_echo ' nvm version-remote <version> Resolve the given description to a single remote version'
+ command printf '%s\n' ' nvm version-remote <version> Resolve the given description to a single remote version'
nvm version-remote <version> Resolve the given description to a single remote version
+ nvm_echo ' --lts When listing, only select from LTS (long-term support) versions'
+ command printf '%s\n' ' --lts When listing, only select from LTS (long-term support) versions'
--lts When listing, only select from LTS (long-term support) versions
+ nvm_echo ' --lts=<LTS name> When listing, only select from versions for a specific LTS line'
+ command printf '%s\n' ' --lts=<LTS name> When listing, only select from versions for a specific LTS line'
--lts=<LTS name> When listing, only select from versions for a specific LTS line
+ nvm_echo ' nvm deactivate Undo effects of `nvm` on current shell'
+ command printf '%s\n' ' nvm deactivate Undo effects of `nvm` on current shell'
nvm deactivate Undo effects of `nvm` on current shell
+ nvm_echo ' nvm alias [<pattern>] Show all aliases beginning with <pattern>'
+ command printf '%s\n' ' nvm alias [<pattern>] Show all aliases beginning with <pattern>'
nvm alias [<pattern>] Show all aliases beginning with <pattern>
+ nvm_echo ' nvm alias <name> <version> Set an alias named <name> pointing to <version>'
+ command printf '%s\n' ' nvm alias <name> <version> Set an alias named <name> pointing to <version>'
nvm alias <name> <version> Set an alias named <name> pointing to <version>
+ nvm_echo ' nvm unalias <name> Deletes the alias named <name>'
+ command printf '%s\n' ' nvm unalias <name> Deletes the alias named <name>'
nvm unalias <name> Deletes the alias named <name>
+ nvm_echo ' nvm reinstall-packages <version> Reinstall global `npm` packages contained in <version> to current version'
+ command printf '%s\n' ' nvm reinstall-packages <version> Reinstall global `npm` packages contained in <version> to current version'
nvm reinstall-packages <version> Reinstall global `npm` packages contained in <version> to current version
+ nvm_echo ' nvm unload Unload `nvm` from shell'
+ command printf '%s\n' ' nvm unload Unload `nvm` from shell'
nvm unload Unload `nvm` from shell
+ nvm_echo ' nvm which [<version>] Display path to installed node version. Uses .nvmrc if available'
+ command printf '%s\n' ' nvm which [<version>] Display path to installed node version. Uses .nvmrc if available'
nvm which [<version>] Display path to installed node version. Uses .nvmrc if available
+ nvm_echo ' nvm cache dir Display path to the cache directory for nvm'
+ command printf '%s\n' ' nvm cache dir Display path to the cache directory for nvm'
nvm cache dir Display path to the cache directory for nvm
+ nvm_echo ' nvm cache clear Empty cache directory for nvm'
+ command printf '%s\n' ' nvm cache clear Empty cache directory for nvm'
nvm cache clear Empty cache directory for nvm
+ nvm_echo
+ command printf '%s\n' ''
+ nvm_echo Example:
+ command printf '%s\n' Example:
Example:
+ nvm_echo ' nvm install v0.10.32 Install a specific version number'
+ command printf '%s\n' ' nvm install v0.10.32 Install a specific version number'
nvm install v0.10.32 Install a specific version number
+ nvm_echo ' nvm use 0.10 Use the latest available 0.10.x release'
+ command printf '%s\n' ' nvm use 0.10 Use the latest available 0.10.x release'
nvm use 0.10 Use the latest available 0.10.x release
+ nvm_echo ' nvm run 0.10.32 app.js Run app.js using node v0.10.32'
+ command printf '%s\n' ' nvm run 0.10.32 app.js Run app.js using node v0.10.32'
nvm run 0.10.32 app.js Run app.js using node v0.10.32
+ nvm_echo ' nvm exec 0.10.32 node app.js Run `node app.js` with the PATH pointing to node v0.10.32'
+ command printf '%s\n' ' nvm exec 0.10.32 node app.js Run `node app.js` with the PATH pointing to node v0.10.32'
nvm exec 0.10.32 node app.js Run `node app.js` with the PATH pointing to node v0.10.32
+ nvm_echo ' nvm alias default 0.10.32 Set default node version on a shell'
+ command printf '%s\n' ' nvm alias default 0.10.32 Set default node version on a shell'
nvm alias default 0.10.32 Set default node version on a shell
+ nvm_echo
+ command printf '%s\n' ''
+ nvm_echo Note:
+ command printf '%s\n' Note:
Note:
+ nvm_echo ' to remove, delete, or uninstall nvm - just remove the `$NVM_DIR` folder (usually `~/.nvm`)'
+ command printf '%s\n' ' to remove, delete, or uninstall nvm - just remove the `$NVM_DIR` folder (usually `~/.nvm`)'
to remove, delete, or uninstall nvm - just remove the `$NVM_DIR` folder (usually `~/.nvm`)
+ nvm_echo
+ command printf '%s\n' ''
+ return 127
real 0m1.122s
user 0m0.078s
sys 0m0.406s
@fjeddy that time prints out 1 second, not 60. Can you show the output for when it takes a minute?
Apparantly not. The command you have provided is just as fast regardless if i have --no-use or not. How would i make it act like it does on Shell start using 30-60 seconds?
The only thing I can think of is if you comment out the lines in your profile (such that it does not run at shell load) and then try to load it manually?
Takes just as long to load manually as it takes from the profile :/ I just ended up removing nvm in my dev environment and installing Node 6.10.2 directly. Now it's back to normal and Bash starts without hiccups in 1-3 seconds depending on how much resources i use.
I wonder if that's unique to your system, or if that's something any Windows 10 user will see.
Is your drive networked at all, or is your system particularly old?
Not sure what you mean by "networked", it's a 32 GB EEMc drive hardwired to the computer. As for my system, it's in no way old, the computer is brand new, few months old, but, it's a crappy computer, Acer Revo Build with 2GB RAM and a Celeron(R) J3060 1.6GHz, nothing to brag over, a fan that runs 24/7 and it's really not happy when i run Telegram, Mailbird, Skype, Steam, Atom, Spotify and Photoshop at the same time 😛
Tho, as mentioned earlier, despite my crappy build, then it beats the living shit out of my $5 VPS where NVM works flawlessly, so i kind of expect it to perform just as well on Bash for Ubuntu.
I would expect so as well; and no other Windows users have complained of this that I'm aware of.
+1
time nvm use stable
Now using node v7.9.0 (npm v4.2.0)
real 0m6.058s
user 0m0.609s
sys 0m6.125s
I'm seeing the same thing.. much slower bash start times since installing nvm
I'm seeing this as well. I put a time before the use line and got the following:
C:\Users\tyler>bash
real 0m8.244s
user 0m0.406s
sys 0m8.250s
Not quite 60 seconds, but probably 7 seconds longer than it should be.
I also tried one with the set -x in .bashrc before using nvm -
here's the result of the slow nvm use:
C:\Users\tyler>bash
+ export NVM_DIR=/home/tyler/.nvm
+ NVM_DIR=/home/tyler/.nvm
+ '[' -s /home/tyler/.nvm/nvm.sh ']'
+ . /home/tyler/.nvm/nvm.sh
++ NVM_SCRIPT_SOURCE=']'
++ '[' -z '' ']'
++ export NVM_CD_FLAGS=
++ NVM_CD_FLAGS=
++ nvm_has unsetopt
++ type unsetopt
++ '[' -z /home/tyler/.nvm ']'
++ unset NVM_SCRIPT_SOURCE
++ nvm_process_parameters
++ local NVM_AUTO_MODE
++ NVM_AUTO_MODE=use
++ nvm_supports_source_options
+++ echo '[ $# -gt 0 ] && echo $1'
+++ . /dev/stdin yes
++ '[' _yes = _yes ']'
++ '[' 0 -ne 0 ']'
++ nvm_auto use
++ local NVM_MODE
++ NVM_MODE=use
++ local VERSION
++ '[' _use = _install ']'
++ '[' _use = _use ']'
+++ nvm_resolve_local_alias default
++ VERSION=v6.10.3
++ '[' -n v6.10.3 ']'
++ nvm use --silent v6.10.3
++ '[' 3 -lt 1 ']'
++ local COMMAND
++ COMMAND=use
++ shift
++ local VERSION
++ local ADDITIONAL_PARAMETERS
++ case $COMMAND in
++ local PROVIDED_VERSION
++ local NVM_USE_SILENT
++ NVM_USE_SILENT=0
++ local NVM_DELETE_PREFIX
++ NVM_DELETE_PREFIX=0
++ local NVM_LTS
++ '[' 2 -ne 0 ']'
++ case "$1" in
++ NVM_USE_SILENT=1
++ shift
++ '[' 1 -ne 0 ']'
++ case "$1" in
++ '[' -n v6.10.3 ']'
++ PROVIDED_VERSION=v6.10.3
++ shift
++ '[' 0 -ne 0 ']'
++ '[' -n '' ']'
++ '[' -z v6.10.3 ']'
+++ nvm_match_version v6.10.3
+++ local NVM_IOJS_PREFIX
++++ nvm_iojs_prefix
++++ nvm_echo iojs
++++ command printf '%s\n' iojs
+++ NVM_IOJS_PREFIX=iojs
+++ local PROVIDED_VERSION
+++ PROVIDED_VERSION=v6.10.3
+++ case "_$PROVIDED_VERSION" in
+++ nvm_version v6.10.3
+++ local PATTERN
+++ PATTERN=v6.10.3
+++ local VERSION
+++ '[' -z v6.10.3 ']'
+++ '[' v6.10.3 = current ']'
+++ local NVM_NODE_PREFIX
++++ nvm_node_prefix
++++ nvm_echo node
++++ command printf '%s\n' node
+++ NVM_NODE_PREFIX=node
+++ case "_${PATTERN}" in
++++ nvm_ls v6.10.3
++++ local PATTERN
++++ PATTERN=v6.10.3
++++ local VERSIONS
++++ VERSIONS=
++++ '[' v6.10.3 = current ']'
++++ local NVM_IOJS_PREFIX
++++ command tail -1
++++ tail -1
+++++ nvm_iojs_prefix
+++++ nvm_echo iojs
+++++ command printf '%s\n' iojs
++++ NVM_IOJS_PREFIX=iojs
++++ local NVM_NODE_PREFIX
+++++ nvm_node_prefix
+++++ nvm_echo node
+++++ command printf '%s\n' node
++++ NVM_NODE_PREFIX=node
++++ local NVM_VERSION_DIR_IOJS
+++++ nvm_version_dir iojs
+++++ local NVM_WHICH_DIR
+++++ NVM_WHICH_DIR=iojs
+++++ '[' -z iojs ']'
+++++ '[' iojs = new ']'
+++++ '[' _iojs = _iojs ']'
+++++ nvm_echo /home/tyler/.nvm/versions/io.js
+++++ command printf '%s\n' /home/tyler/.nvm/versions/io.js
++++ NVM_VERSION_DIR_IOJS=/home/tyler/.nvm/versions/io.js
++++ local NVM_VERSION_DIR_NEW
+++++ nvm_version_dir new
+++++ local NVM_WHICH_DIR
+++++ NVM_WHICH_DIR=new
+++++ '[' -z new ']'
+++++ '[' new = new ']'
+++++ nvm_echo /home/tyler/.nvm/versions/node
+++++ command printf '%s\n' /home/tyler/.nvm/versions/node
++++ NVM_VERSION_DIR_NEW=/home/tyler/.nvm/versions/node
++++ local NVM_VERSION_DIR_OLD
+++++ nvm_version_dir old
+++++ local NVM_WHICH_DIR
+++++ NVM_WHICH_DIR=old
+++++ '[' -z old ']'
+++++ '[' old = new ']'
+++++ '[' _old = _iojs ']'
+++++ '[' _old = _old ']'
+++++ nvm_echo /home/tyler/.nvm
+++++ command printf '%s\n' /home/tyler/.nvm
++++ NVM_VERSION_DIR_OLD=/home/tyler/.nvm
++++ case "${PATTERN}" in
++++ nvm_resolve_local_alias v6.10.3
++++ '[' -z v6.10.3 ']'
++++ local VERSION
++++ local EXIT_CODE
+++++ nvm_resolve_alias v6.10.3
+++++ '[' -z v6.10.3 ']'
+++++ local PATTERN
+++++ PATTERN=v6.10.3
+++++ local ALIAS
+++++ ALIAS=v6.10.3
+++++ local ALIAS_TEMP
+++++ local SEEN_ALIASES
+++++ SEEN_ALIASES=v6.10.3
+++++ true
++++++ nvm_alias v6.10.3
++++++ echo
+++++ ALIAS_TEMP=
+++++ '[' -z '' ']'
+++++ break
+++++ '[' -n v6.10.3 ']'
+++++ '[' _v6.10.3 '!=' _v6.10.3 ']'
+++++ nvm_validate_implicit_alias v6.10.3
+++++ return 2
++++ VERSION=
++++ EXIT_CODE=2
++++ '[' -z '' ']'
++++ return 2
+++++ nvm_ensure_version_prefix v6.10.3
+++++ local NVM_VERSION
++++++ nvm_strip_iojs_prefix v6.10.3
++++++ local NVM_IOJS_PREFIX
++++++ command sed -e 's/^\([0-9]\)/v\1/g'
++++++ sed -e 's/^\([0-9]\)/v\1/g'
+++++++ nvm_iojs_prefix
+++++++ nvm_echo iojs
+++++++ command printf '%s\n' iojs
++++++ NVM_IOJS_PREFIX=iojs
++++++ '[' v6.10.3 = iojs ']'
++++++ nvm_echo v6.10.3
++++++ command printf '%s\n' v6.10.3
+++++ NVM_VERSION=v6.10.3
+++++ nvm_is_iojs_version v6.10.3
+++++ case "${1-}" in
+++++ return 1
+++++ nvm_echo v6.10.3
+++++ command printf '%s\n' v6.10.3
++++ PATTERN=v6.10.3
++++ '[' v6.10.3 = N/A ']'
++++ local NVM_PATTERN_STARTS_WITH_V
++++ case $PATTERN in
++++ NVM_PATTERN_STARTS_WITH_V=true
++++ '[' true = true ']'
+++++ nvm_num_version_groups v6.10.3
+++++ local VERSION
+++++ VERSION=v6.10.3
+++++ VERSION=6.10.3
+++++ VERSION=6.10.3
+++++ '[' -z 6.10.3 ']'
+++++ local NVM_NUM_DOTS
++++++ nvm_echo 6.10.3
++++++ command printf '%s\n' 6.10.3
++++++ command sed -e 's/[^\.]//g'
++++++ sed -e 's/[^\.]//g'
+++++ NVM_NUM_DOTS=..
+++++ local NVM_NUM_GROUPS
+++++ NVM_NUM_GROUPS=...
+++++ nvm_echo 3
+++++ command printf '%s\n' 3
++++ '[' _3 = _3 ']'
++++ nvm_is_version_installed v6.10.3
++++ '[' -n v6.10.3 ']'
+++++ nvm_version_path v6.10.3
++++ '[' -d /home/tyler/.nvm/versions/node/v6.10.3 ']'
++++ VERSIONS=v6.10.3
++++ '[' '' = true ']'
++++ '[' -z v6.10.3 ']'
++++ nvm_echo v6.10.3
++++ command printf '%s\n' v6.10.3
+++ VERSION=v6.10.3
+++ '[' -z v6.10.3 ']'
+++ '[' _v6.10.3 = _N/A ']'
+++ nvm_echo v6.10.3
+++ command printf '%s\n' v6.10.3
++ VERSION=v6.10.3
++ '[' -z v6.10.3 ']'
++ '[' _v6.10.3 = _system ']'
++ '[' _v6.10.3 = _∞ ']'
++ '[' v6.10.3 = N/A ']'
++ nvm_ensure_version_installed v6.10.3
++ local PROVIDED_VERSION
++ PROVIDED_VERSION=v6.10.3
++ '[' v6.10.3 = system ']'
++ local LOCAL_VERSION
++ local EXIT_CODE
+++ nvm_version v6.10.3
+++ local PATTERN
+++ PATTERN=v6.10.3
+++ local VERSION
+++ '[' -z v6.10.3 ']'
+++ '[' v6.10.3 = current ']'
+++ local NVM_NODE_PREFIX
++++ nvm_node_prefix
++++ nvm_echo node
++++ command printf '%s\n' node
+++ NVM_NODE_PREFIX=node
+++ case "_${PATTERN}" in
++++ nvm_ls v6.10.3
++++ local PATTERN
++++ PATTERN=v6.10.3
++++ local VERSIONS
++++ VERSIONS=
++++ '[' v6.10.3 = current ']'
++++ local NVM_IOJS_PREFIX
++++ command tail -1
++++ tail -1
+++++ nvm_iojs_prefix
+++++ nvm_echo iojs
+++++ command printf '%s\n' iojs
++++ NVM_IOJS_PREFIX=iojs
++++ local NVM_NODE_PREFIX
+++++ nvm_node_prefix
+++++ nvm_echo node
+++++ command printf '%s\n' node
++++ NVM_NODE_PREFIX=node
++++ local NVM_VERSION_DIR_IOJS
+++++ nvm_version_dir iojs
+++++ local NVM_WHICH_DIR
+++++ NVM_WHICH_DIR=iojs
+++++ '[' -z iojs ']'
+++++ '[' iojs = new ']'
+++++ '[' _iojs = _iojs ']'
+++++ nvm_echo /home/tyler/.nvm/versions/io.js
+++++ command printf '%s\n' /home/tyler/.nvm/versions/io.js
++++ NVM_VERSION_DIR_IOJS=/home/tyler/.nvm/versions/io.js
++++ local NVM_VERSION_DIR_NEW
+++++ nvm_version_dir new
+++++ local NVM_WHICH_DIR
+++++ NVM_WHICH_DIR=new
+++++ '[' -z new ']'
+++++ '[' new = new ']'
+++++ nvm_echo /home/tyler/.nvm/versions/node
+++++ command printf '%s\n' /home/tyler/.nvm/versions/node
++++ NVM_VERSION_DIR_NEW=/home/tyler/.nvm/versions/node
++++ local NVM_VERSION_DIR_OLD
+++++ nvm_version_dir old
+++++ local NVM_WHICH_DIR
+++++ NVM_WHICH_DIR=old
+++++ '[' -z old ']'
+++++ '[' old = new ']'
+++++ '[' _old = _iojs ']'
+++++ '[' _old = _old ']'
+++++ nvm_echo /home/tyler/.nvm
+++++ command printf '%s\n' /home/tyler/.nvm
++++ NVM_VERSION_DIR_OLD=/home/tyler/.nvm
++++ case "${PATTERN}" in
++++ nvm_resolve_local_alias v6.10.3
++++ '[' -z v6.10.3 ']'
++++ local VERSION
++++ local EXIT_CODE
+++++ nvm_resolve_alias v6.10.3
+++++ '[' -z v6.10.3 ']'
+++++ local PATTERN
+++++ PATTERN=v6.10.3
+++++ local ALIAS
+++++ ALIAS=v6.10.3
+++++ local ALIAS_TEMP
+++++ local SEEN_ALIASES
+++++ SEEN_ALIASES=v6.10.3
+++++ true
++++++ nvm_alias v6.10.3
++++++ echo
+++++ ALIAS_TEMP=
+++++ '[' -z '' ']'
+++++ break
+++++ '[' -n v6.10.3 ']'
+++++ '[' _v6.10.3 '!=' _v6.10.3 ']'
+++++ nvm_validate_implicit_alias v6.10.3
+++++ return 2
++++ VERSION=
++++ EXIT_CODE=2
++++ '[' -z '' ']'
++++ return 2
+++++ nvm_ensure_version_prefix v6.10.3
+++++ local NVM_VERSION
++++++ nvm_strip_iojs_prefix v6.10.3
++++++ local NVM_IOJS_PREFIX
++++++ command sed -e 's/^\([0-9]\)/v\1/g'
++++++ sed -e 's/^\([0-9]\)/v\1/g'
+++++++ nvm_iojs_prefix
+++++++ nvm_echo iojs
+++++++ command printf '%s\n' iojs
++++++ NVM_IOJS_PREFIX=iojs
++++++ '[' v6.10.3 = iojs ']'
++++++ nvm_echo v6.10.3
++++++ command printf '%s\n' v6.10.3
+++++ NVM_VERSION=v6.10.3
+++++ nvm_is_iojs_version v6.10.3
+++++ case "${1-}" in
+++++ return 1
+++++ nvm_echo v6.10.3
+++++ command printf '%s\n' v6.10.3
++++ PATTERN=v6.10.3
++++ '[' v6.10.3 = N/A ']'
++++ local NVM_PATTERN_STARTS_WITH_V
++++ case $PATTERN in
++++ NVM_PATTERN_STARTS_WITH_V=true
++++ '[' true = true ']'
+++++ nvm_num_version_groups v6.10.3
+++++ local VERSION
+++++ VERSION=v6.10.3
+++++ VERSION=6.10.3
+++++ VERSION=6.10.3
+++++ '[' -z 6.10.3 ']'
+++++ local NVM_NUM_DOTS
++++++ nvm_echo 6.10.3
++++++ command printf '%s\n' 6.10.3
++++++ command sed -e 's/[^\.]//g'
++++++ sed -e 's/[^\.]//g'
+++++ NVM_NUM_DOTS=..
+++++ local NVM_NUM_GROUPS
+++++ NVM_NUM_GROUPS=...
+++++ nvm_echo 3
+++++ command printf '%s\n' 3
++++ '[' _3 = _3 ']'
++++ nvm_is_version_installed v6.10.3
++++ '[' -n v6.10.3 ']'
+++++ nvm_version_path v6.10.3
++++ '[' -d /home/tyler/.nvm/versions/node/v6.10.3 ']'
++++ VERSIONS=v6.10.3
++++ '[' '' = true ']'
++++ '[' -z v6.10.3 ']'
++++ nvm_echo v6.10.3
++++ command printf '%s\n' v6.10.3
+++ VERSION=v6.10.3
+++ '[' -z v6.10.3 ']'
+++ '[' _v6.10.3 = _N/A ']'
+++ nvm_echo v6.10.3
+++ command printf '%s\n' v6.10.3
++ LOCAL_VERSION=v6.10.3
++ EXIT_CODE=0
++ local NVM_VERSION_DIR
++ '[' 0 '!=' 0 ']'
++ nvm_is_version_installed v6.10.3
++ '[' -n v6.10.3 ']'
+++ nvm_version_path v6.10.3
++ '[' -d /home/tyler/.nvm/versions/node/v6.10.3 ']'
++ local NVM_VERSION_DIR
+++ nvm_version_path v6.10.3
+++ local VERSION
+++ VERSION=v6.10.3
+++ '[' -z v6.10.3 ']'
+++ nvm_is_iojs_version v6.10.3
+++ case "${1-}" in
+++ return 1
+++ nvm_version_greater 0.12.0 v6.10.3
+++ command awk 'BEGIN {
if (ARGV[1] == "" || ARGV[2] == "") exit(1)
split(ARGV[1], a, /\./);
split(ARGV[2], b, /\./);
for (i=1; i<=3; i++) {
if (a[i] && a[i] !~ /^[0-9]+$/) exit(2);
if (b[i] && b[i] !~ /^[0-9]+$/) { exit(0); }
if (a[i] < b[i]) exit(3);
else if (a[i] > b[i]) exit(0);
}
exit(4)
}' 0.12.0 6.10.3
+++ awk 'BEGIN {
if (ARGV[1] == "" || ARGV[2] == "") exit(1)
split(ARGV[1], a, /\./);
split(ARGV[2], b, /\./);
for (i=1; i<=3; i++) {
if (a[i] && a[i] !~ /^[0-9]+$/) exit(2);
if (b[i] && b[i] !~ /^[0-9]+$/) { exit(0); }
if (a[i] < b[i]) exit(3);
else if (a[i] > b[i]) exit(0);
}
exit(4)
}' 0.12.0 6.10.3
++++ nvm_version_dir new
++++ local NVM_WHICH_DIR
++++ NVM_WHICH_DIR=new
++++ '[' -z new ']'
++++ '[' new = new ']'
++++ nvm_echo /home/tyler/.nvm/versions/node
++++ command printf '%s\n' /home/tyler/.nvm/versions/node
+++ nvm_echo /home/tyler/.nvm/versions/node/v6.10.3
+++ command printf '%s\n' /home/tyler/.nvm/versions/node/v6.10.3
++ NVM_VERSION_DIR=/home/tyler/.nvm/versions/node/v6.10.3
+++ nvm_strip_path '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files/Git/cmd:/mnt/c/Python27:/mnt/c/Python27/Scripts:/mnt/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/Microsoft DNX/Dnvm:/mnt/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/mnt/c/Users/tyler/AppData/Roaming/nvm:/mnt/c/Users/tyler/AppData/Roaming/nvm/v6.9.1:/mnt/c/Program Files/MongoDB/Server/3.2/bin:/mnt/c/Users/tyler/AppData/Local/atom/bin:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/Microsoft SQL Server/Client SDK/ODBC/130/Tools/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/Tools/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/DTS/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/Tools/Binn/ManagementStudio:/mnt/c/Program Files (x86)/PuTTY:/mnt/c/Program Files (x86)/Microsoft VS Code/bin:/mnt/c/Users/tyler/AppData/Roaming/nvm:/mnt/c/Users/tyler/AppData/Roaming/nvm/v6.9.1:/mnt/c/Users/tyler/AppData/Roaming/npm:/mnt/c/Users/tyler/AppData/Local/Microsoft/WindowsApps' /bin
+++ '[' -z /home/tyler/.nvm ']'
+++ nvm_echo '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files/Git/cmd:/mnt/c/Python27:/mnt/c/Python27/Scripts:/mnt/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/Microsoft DNX/Dnvm:/mnt/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/mnt/c/Users/tyler/AppData/Roaming/nvm:/mnt/c/Users/tyler/AppData/Roaming/nvm/v6.9.1:/mnt/c/Program Files/MongoDB/Server/3.2/bin:/mnt/c/Users/tyler/AppData/Local/atom/bin:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/Microsoft SQL Server/Client SDK/ODBC/130/Tools/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/Tools/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/DTS/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/Tools/Binn/ManagementStudio:/mnt/c/Program Files (x86)/PuTTY:/mnt/c/Program Files (x86)/Microsoft VS Code/bin:/mnt/c/Users/tyler/AppData/Roaming/nvm:/mnt/c/Users/tyler/AppData/Roaming/nvm/v6.9.1:/mnt/c/Users/tyler/AppData/Roaming/npm:/mnt/c/Users/tyler/AppData/Local/Microsoft/WindowsApps'
+++ command printf '%s\n' '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files/Git/cmd:/mnt/c/Python27:/mnt/c/Python27/Scripts:/mnt/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/Microsoft DNX/Dnvm:/mnt/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/mnt/c/Users/tyler/AppData/Roaming/nvm:/mnt/c/Users/tyler/AppData/Roaming/nvm/v6.9.1:/mnt/c/Program Files/MongoDB/Server/3.2/bin:/mnt/c/Users/tyler/AppData/Local/atom/bin:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/Microsoft SQL Server/Client SDK/ODBC/130/Tools/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/Tools/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/DTS/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/Tools/Binn/ManagementStudio:/mnt/c/Program Files (x86)/PuTTY:/mnt/c/Program Files (x86)/Microsoft VS Code/bin:/mnt/c/Users/tyler/AppData/Roaming/nvm:/mnt/c/Users/tyler/AppData/Roaming/nvm/v6.9.1:/mnt/c/Users/tyler/AppData/Roaming/npm:/mnt/c/Users/tyler/AppData/Local/Microsoft/WindowsApps'
+++ command sed -e 's#/home/tyler/.nvm/[^/]*/bin[^:]*:##g' -e 's#:/home/tyler/.nvm/[^/]*/bin[^:]*##g' -e 's#/home/tyler/.nvm/[^/]*/bin[^:]*##g' -e 's#/home/tyler/.nvm/versions/[^/]*/[^/]*/bin[^:]*:##g' -e 's#:/home/tyler/.nvm/versions/[^/]*/[^/]*/bin[^:]*##g' -e 's#/home/tyler/.nvm/versions/[^/]*/[^/]*/bin[^:]*##g'
+++ sed -e 's#/home/tyler/.nvm/[^/]*/bin[^:]*:##g' -e 's#:/home/tyler/.nvm/[^/]*/bin[^:]*##g' -e 's#/home/tyler/.nvm/[^/]*/bin[^:]*##g' -e 's#/home/tyler/.nvm/versions/[^/]*/[^/]*/bin[^:]*:##g' -e 's#:/home/tyler/.nvm/versions/[^/]*/[^/]*/bin[^:]*##g' -e 's#/home/tyler/.nvm/versions/[^/]*/[^/]*/bin[^:]*##g'
++ PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files/Git/cmd:/mnt/c/Python27:/mnt/c/Python27/Scripts:/mnt/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/Microsoft DNX/Dnvm:/mnt/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/mnt/c/Users/tyler/AppData/Roaming/nvm:/mnt/c/Users/tyler/AppData/Roaming/nvm/v6.9.1:/mnt/c/Program Files/MongoDB/Server/3.2/bin:/mnt/c/Users/tyler/AppData/Local/atom/bin:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/Microsoft SQL Server/Client SDK/ODBC/130/Tools/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/Tools/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/DTS/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/Tools/Binn/ManagementStudio:/mnt/c/Program Files (x86)/PuTTY:/mnt/c/Program Files (x86)/Microsoft VS Code/bin:/mnt/c/Users/tyler/AppData/Roaming/nvm:/mnt/c/Users/tyler/AppData/Roaming/nvm/v6.9.1:/mnt/c/Users/tyler/AppData/Roaming/npm:/mnt/c/Users/tyler/AppData/Local/Microsoft/WindowsApps'
+++ nvm_prepend_path '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files/Git/cmd:/mnt/c/Python27:/mnt/c/Python27/Scripts:/mnt/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/Microsoft DNX/Dnvm:/mnt/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/mnt/c/Users/tyler/AppData/Roaming/nvm:/mnt/c/Users/tyler/AppData/Roaming/nvm/v6.9.1:/mnt/c/Program Files/MongoDB/Server/3.2/bin:/mnt/c/Users/tyler/AppData/Local/atom/bin:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/Microsoft SQL Server/Client SDK/ODBC/130/Tools/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/Tools/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/DTS/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/Tools/Binn/ManagementStudio:/mnt/c/Program Files (x86)/PuTTY:/mnt/c/Program Files (x86)/Microsoft VS Code/bin:/mnt/c/Users/tyler/AppData/Roaming/nvm:/mnt/c/Users/tyler/AppData/Roaming/nvm/v6.9.1:/mnt/c/Users/tyler/AppData/Roaming/npm:/mnt/c/Users/tyler/AppData/Local/Microsoft/WindowsApps' /home/tyler/.nvm/versions/node/v6.10.3/bin
+++ '[' -z '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files/Git/cmd:/mnt/c/Python27:/mnt/c/Python27/Scripts:/mnt/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/Microsoft DNX/Dnvm:/mnt/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/mnt/c/Users/tyler/AppData/Roaming/nvm:/mnt/c/Users/tyler/AppData/Roaming/nvm/v6.9.1:/mnt/c/Program Files/MongoDB/Server/3.2/bin:/mnt/c/Users/tyler/AppData/Local/atom/bin:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/Microsoft SQL Server/Client SDK/ODBC/130/Tools/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/Tools/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/DTS/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/Tools/Binn/ManagementStudio:/mnt/c/Program Files (x86)/PuTTY:/mnt/c/Program Files (x86)/Microsoft VS Code/bin:/mnt/c/Users/tyler/AppData/Roaming/nvm:/mnt/c/Users/tyler/AppData/Roaming/nvm/v6.9.1:/mnt/c/Users/tyler/AppData/Roaming/npm:/mnt/c/Users/tyler/AppData/Local/Microsoft/WindowsApps' ']'
+++ nvm_echo '/home/tyler/.nvm/versions/node/v6.10.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files/Git/cmd:/mnt/c/Python27:/mnt/c/Python27/Scripts:/mnt/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/Microsoft DNX/Dnvm:/mnt/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/mnt/c/Users/tyler/AppData/Roaming/nvm:/mnt/c/Users/tyler/AppData/Roaming/nvm/v6.9.1:/mnt/c/Program Files/MongoDB/Server/3.2/bin:/mnt/c/Users/tyler/AppData/Local/atom/bin:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/Microsoft SQL Server/Client SDK/ODBC/130/Tools/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/Tools/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/DTS/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/Tools/Binn/ManagementStudio:/mnt/c/Program Files (x86)/PuTTY:/mnt/c/Program Files (x86)/Microsoft VS Code/bin:/mnt/c/Users/tyler/AppData/Roaming/nvm:/mnt/c/Users/tyler/AppData/Roaming/nvm/v6.9.1:/mnt/c/Users/tyler/AppData/Roaming/npm:/mnt/c/Users/tyler/AppData/Local/Microsoft/WindowsApps'
+++ command printf '%s\n' '/home/tyler/.nvm/versions/node/v6.10.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files/Git/cmd:/mnt/c/Python27:/mnt/c/Python27/Scripts:/mnt/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/Microsoft DNX/Dnvm:/mnt/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/mnt/c/Users/tyler/AppData/Roaming/nvm:/mnt/c/Users/tyler/AppData/Roaming/nvm/v6.9.1:/mnt/c/Program Files/MongoDB/Server/3.2/bin:/mnt/c/Users/tyler/AppData/Local/atom/bin:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/Microsoft SQL Server/Client SDK/ODBC/130/Tools/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/Tools/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/DTS/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/Tools/Binn/ManagementStudio:/mnt/c/Program Files (x86)/PuTTY:/mnt/c/Program Files (x86)/Microsoft VS Code/bin:/mnt/c/Users/tyler/AppData/Roaming/nvm:/mnt/c/Users/tyler/AppData/Roaming/nvm/v6.9.1:/mnt/c/Users/tyler/AppData/Roaming/npm:/mnt/c/Users/tyler/AppData/Local/Microsoft/WindowsApps'
++ PATH='/home/tyler/.nvm/versions/node/v6.10.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files/Git/cmd:/mnt/c/Python27:/mnt/c/Python27/Scripts:/mnt/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/Microsoft DNX/Dnvm:/mnt/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/mnt/c/Users/tyler/AppData/Roaming/nvm:/mnt/c/Users/tyler/AppData/Roaming/nvm/v6.9.1:/mnt/c/Program Files/MongoDB/Server/3.2/bin:/mnt/c/Users/tyler/AppData/Local/atom/bin:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/Microsoft SQL Server/Client SDK/ODBC/130/Tools/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/Tools/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/DTS/Binn:/mnt/c/Program Files (x86)/Microsoft SQL Server/130/Tools/Binn/ManagementStudio:/mnt/c/Program Files (x86)/PuTTY:/mnt/c/Program Files (x86)/Microsoft VS Code/bin:/mnt/c/Users/tyler/AppData/Roaming/nvm:/mnt/c/Users/tyler/AppData/Roaming/nvm/v6.9.1:/mnt/c/Users/tyler/AppData/Roaming/npm:/mnt/c/Users/tyler/AppData/Local/Microsoft/WindowsApps'
++ nvm_has manpath
++ type manpath
++ '[' -z '' ']'
++ local MANPATH
+++ manpath
++ MANPATH=/home/tyler/.nvm/versions/node/v6.10.3/share/man:/usr/local/man:/usr/local/share/man:/usr/share/man
+++ nvm_strip_path /home/tyler/.nvm/versions/node/v6.10.3/share/man:/usr/local/man:/usr/local/share/man:/usr/share/man /share/man
+++ '[' -z /home/tyler/.nvm ']'
+++ nvm_echo /home/tyler/.nvm/versions/node/v6.10.3/share/man:/usr/local/man:/usr/local/share/man:/usr/share/man
+++ command printf '%s\n' /home/tyler/.nvm/versions/node/v6.10.3/share/man:/usr/local/man:/usr/local/share/man:/usr/share/man
+++ command sed -e 's#/home/tyler/.nvm/[^/]*/share/man[^:]*:##g' -e 's#:/home/tyler/.nvm/[^/]*/share/man[^:]*##g' -e 's#/home/tyler/.nvm/[^/]*/share/man[^:]*##g' -e 's#/home/tyler/.nvm/versions/[^/]*/[^/]*/share/man[^:]*:##g' -e 's#:/home/tyler/.nvm/versions/[^/]*/[^/]*/share/man[^:]*##g' -e 's#/home/tyler/.nvm/versions/[^/]*/[^/]*/share/man[^:]*##g'
+++ sed -e 's#/home/tyler/.nvm/[^/]*/share/man[^:]*:##g' -e 's#:/home/tyler/.nvm/[^/]*/share/man[^:]*##g' -e 's#/home/tyler/.nvm/[^/]*/share/man[^:]*##g' -e 's#/home/tyler/.nvm/versions/[^/]*/[^/]*/share/man[^:]*:##g' -e 's#:/home/tyler/.nvm/versions/[^/]*/[^/]*/share/man[^:]*##g' -e 's#/home/tyler/.nvm/versions/[^/]*/[^/]*/share/man[^:]*##g'
++ MANPATH=/usr/local/man:/usr/local/share/man:/usr/share/man
+++ nvm_prepend_path /usr/local/man:/usr/local/share/man:/usr/share/man /home/tyler/.nvm/versions/node/v6.10.3/share/man
+++ '[' -z /usr/local/man:/usr/local/share/man:/usr/share/man ']'
+++ nvm_echo /home/tyler/.nvm/versions/node/v6.10.3/share/man:/usr/local/man:/usr/local/share/man:/usr/share/man
+++ command printf '%s\n' /home/tyler/.nvm/versions/node/v6.10.3/share/man:/usr/local/man:/usr/local/share/man:/usr/share/man
++ MANPATH=/home/tyler/.nvm/versions/node/v6.10.3/share/man:/usr/local/man:/usr/local/share/man:/usr/share/man
++ export MANPATH
++ export PATH
++ hash -r
++ export NVM_BIN=/home/tyler/.nvm/versions/node/v6.10.3/bin
++ NVM_BIN=/home/tyler/.nvm/versions/node/v6.10.3/bin
++ '[' '' = true ']'
++ local NVM_USE_OUTPUT
++ '[' 1 -ne 1 ']'
++ '[' _v6.10.3 '!=' _system ']'
++ local NVM_USE_CMD
++ NVM_USE_CMD='nvm use --delete-prefix'
++ '[' -n v6.10.3 ']'
++ NVM_USE_CMD='nvm use --delete-prefix v6.10.3'
++ '[' 1 -eq 1 ']'
++ NVM_USE_CMD='nvm use --delete-prefix v6.10.3 --silent'
++ nvm_die_on_prefix 0 'nvm use --delete-prefix v6.10.3 --silent'
++ local NVM_DELETE_PREFIX
++ NVM_DELETE_PREFIX=0
++ case "$NVM_DELETE_PREFIX" in
++ local NVM_COMMAND
++ NVM_COMMAND='nvm use --delete-prefix v6.10.3 --silent'
++ '[' -z 'nvm use --delete-prefix v6.10.3 --silent' ']'
++ '[' -n '' ']'
++ '[' -n '' ']'
++ nvm_has npm
++ type npm
++ local NVM_NPM_PREFIX
+++ npm config --loglevel=warn get prefix
++ NVM_NPM_PREFIX=/home/tyler/.nvm/versions/node/v6.10.3
++ nvm_tree_contains_path /home/tyler/.nvm /home/tyler/.nvm/versions/node/v6.10.3
++ '[' -n '' ']'
real 0m8.508s
user 0m0.500s
sys 0m8.109s
+ '[' -s /home/tyler/.nvm/bash_completion ']'
+ . /home/tyler/.nvm/bash_completion
++ nvm
++ [[ -n '' ]]
++ complete -o default -F __nvm nvm
Most of it went by pretty quickly, the only things there was a noticable pause was nvm_resolve_local_alias default ... and to a lesser extent npm config --loglevel=warn get prefix
Not sure if this is relevant, but I am using nvm for windows outside of WSL.... I see it listed there in my path. If that one is run, it gets awful confused and npm will blow up doing anything. It doesn't seem to affect running nvm or node/npm inside WSL.
Here's commands I ran to get to this point:
sudo apt-get autoremove --purge npm node nodejs
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install nodejs
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
exit
nvm install --lts
exit
# <-- start new shell, takes 8 seconds
no other Windows users have complained of this that I'm aware of.
See: https://github.com/davatron5000/can-i-subsystem-it -- nvm note, "Causes slow Bash start times"
I may just go the same route as @fjeddy and use node directly without nvm. For my uses, this is more of a "toy" I'd say and there's not a lot of need to switch node versions often. At work though, I do use ubuntu and need to switch versions often... nvm startup isn't noticeable there.
I'm not sure what you mean about "outside of WSL" - isn't WSL the same as "BashOnWindows"?
That linked repo says "Disk IO perf is relatively slow. " - if that's just a known problem in BashOnWindows, then since nvm does disk i/o, there's not really anything I can do to fix it.
Right, WSL=BashOnWindows. Outside WSL means just running cmd.exe in windows. You spin up bash by typing bash in cmd which will start a WSL session
I'm seeing this slowdown as well. It takes about 6 seconds. Things like git etc seem performant on windows, so I don't think it's just IO. I have noticed emacs is slower than it should be to load. So it's likely some slow path/syscall being hit or something. Probably not NVM's fault and I could see how this would be hard to debug.
Just for another data point - I'm seeing this also. Here's my output from time nvm use default:
real 0m31.537s
user 0m2.984s
sys 0m28.141s
# NODE VERSION MANAGER
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# This loads nvm
Clearly,these lines in ~/.bashrc delays my terminal startup by 30s :astonished:
Clearly,these lines in ~/.bashrc delays my terminal startup by 30s
@arangates I found these lines are slow too (on MacOS)
I found a workaround in #860 by doing
nvm use x.x.x part (nvm use is slow)@arangates tried --no-use?
https://github.com/creationix/nvm/issues/1493#issuecomment-293668695
@liuderchi Great workaround ...it works :+1:
Seems to be dramatically faster on the latest stable releases as of today (4-26-2018)
windows 10
wsl
ubuntu
nvm
node 8
slow down seems to be only 5 seconds or less now.
dont know who did what but thank you!
This seems to have been fixed; closing. Please file a new issue if you're still seeing perf issues.
@fjeddy try to use
--no-usewhen loading?export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" --no-use # This loads nvm
thx, you save my life!
Most helpful comment
@fjeddy try to use
--no-usewhen loading?