This is all on a MacBook Air recently restored to factory and upgraded to Sierra - I'm unsure if this is related to Sierra as I had installed nvm and autoenv a good deal ago on El Capitan before this. It may or may not be related to https://github.com/creationix/nvm/issues/1227.
I'm using autoenv (runs nvm use on cd), digging into what the actual nvm command it executes is
cd control
Found '/Users/alawry/dev/brighttag/ui/control/.nvmrc' with version <v5.7.1>
-bash: sort -t. -u -k 1.2,1n -k 2,2n -k 3,3n: command not found
Version 'v5.7.1' not found - try `nvm ls-remote` to browse available versions.
here's proof that v5.7.1 is on my system:
$ nvm use
Found '/Users/alawry/dev/brighttag/ui/control/.nvmrc' with version <v5.7.1>
Now using node v5.7.1 (npm v3.6.0)
Debug information:
$ nvm debug
nvm --version: v0.31.7
$SHELL: /bin/bash
$HOME: /Users/alawry
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
nvm current: v5.7.1
which node: $NVM_DIR/versions/node/v5.7.1/bin/node
which iojs:
which npm: $NVM_DIR/versions/node/v5.7.1/bin/npm
npm config get prefix: $NVM_DIR/versions/node/v5.7.1
npm root -g: $NVM_DIR/versions/node/v5.7.1/lib/node_modules
$ which sort
/usr/bin/sort
$ type sort
sort is /usr/bin/sort
$ command sort
^C
had to ctrl-c the command sort
So it looks like nvm use is unable to find sort only when run by autoenv?
Those are the only two use cases I have currently, and in terms of those two use-cases the statement is correct.
Actually, it looks like autoenv is executing nvm install, which also works from my commandline.
.env file executed by autoenv:
$ cat .env
nvm install
nvm install ran locally
$ nvm install
Found '/Users/alawry/dev/brighttag/ui/control/.nvmrc' with version <v5.7.1>
v5.7.1 is already installed.
Now using node v5.7.1 (npm v3.6.0)
can you add echo "$PATH" to .env, and compare that to echo "$PATH" on your shell?
Has this been resolved? I just upgraded to Sierra and I am having the same problem :(
what is echo "|$IFS|"?
^ command just prints two line swith | like
|
|
@bachateraconfuego hmm - I guess the question is, is that space-tab-newline? or is that just tab-newline?
Reading 1227 I set IFS=$' ' and now it works!