nvm
nvm copied to clipboard
nvm throws error "not compatible with npm config "prefix" when opening tmux shell
trafficstars
-
Operating system and version: macOS Sierra
-
nvm debugoutput:
nvm --version: v0.33.6
$TERM_PROGRAM: iTerm.app
$SHELL: /bin/bash
$HOME: /Users/wells
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16)'
uname -a: 'Darwin 16.7.0 Darwin Kernel Version 16.7.0: Wed Oct 4 00:17:00 PDT 2017; root:xnu-3789.71.6~1/RELEASE_X86_64 x86_64'
OS version: Mac 10.12.6 16G1036
curl: /usr/bin/curl, curl 7.54.0 (x86_64-apple-darwin16.0) libcurl/7.54.0 SecureTransport zlib/1.2.8
wget: not found
git: /usr/bin/git, git version 2.13.5 (Apple Git-94)
grep: /usr/bin/grep (grep --color=auto), grep (BSD grep) 2.5.1-FreeBSD
awk: /usr/bin/awk, awk version 20070501
sed: illegal option -- -
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
sed: /usr/bin/sed,
cut: illegal option -- -
usage: cut -b list [-n] [file ...]
cut -c list [file ...]
cut -f list [-s] [-d delim] [file ...]
cut: /usr/bin/cut,
basename: illegal option -- -
usage: basename string [suffix]
basename [-a] [-s suffix] string [...]
basename: /usr/bin/basename,
rm: illegal option -- -
usage: rm [-f | -i] [-dPRrvW] file ...
unlink file
rm: /bin/rm,
mkdir: illegal option -- -
usage: mkdir [-pv] [-m mode] directory ...
mkdir: /bin/mkdir,
xargs: illegal option -- -
usage: xargs [-0opt] [-E eofstr] [-I replstr [-R replacements]] [-J replstr]
[-L number] [-n number [-x]] [-P maxprocs] [-s size]
[utility [argument ...]]
xargs: /usr/bin/xargs,
nvm current: system
which node: /usr/local/bin/node
which iojs:
which npm: /usr/local/bin/npm
npm config get prefix: /usr/local
npm root -g: /usr/local/lib/node_modules
nvm lsoutput:
v6.4.0
v6.5.0
v9.0.0
-> system
default -> 6.5 (-> v6.5.0)
node -> stable (-> v9.0.0) (default)
stable -> 9.0 (-> v9.0.0) (default)
iojs -> N/A (default)
lts/* -> lts/carbon (-> N/A)
lts/argon -> v4.8.5 (-> N/A)
lts/boron -> v6.11.5 (-> N/A)
lts/carbon -> v8.9.0 (-> N/A)
- How did you install
nvm? (e.g. install script in readme, homebrew): install script - What steps did you perform? nvm install 6.5 nvm alias default 6.5
- What happened? When I open the terminal, node is the correct version (6.5). When I open tmux, it throws an error and node is version 8.9.0. The error message is:
nvm is not compatible with the npm config "prefix" option: currently set to "/usr/local"
Run `npm config delete prefix` or `nvm use --delete-prefix v6.5.0 --silent` to unset it.
- What did you expect to happen? nvm should not throw an error, and the node version in tmux should also be 6.5
- Is there anything in any of your profile files (
.bashrc,.bash_profile,.zshrc, etc) that modifies thePATH? yes
export PATH=$HOME/usr/local/sbin:$PATH
export PATH=$HOME/bin:$PATH
This appears to be a duplicate of #1652.
@wellsjo is this still an issue for you on the current version of nvm?
It should continue to be an issue forever, until termux stops setting $PREFIX.