Skip to content

--reinstall-packages-from= option unrecognized when doing nvm install --lts #1762

@joeptacek

Description

@joeptacek
  • Operating system and version:

MacOS 10.13.3

  • nvm debug output:
Details
nvm --version: v0.33.8
$TERM_PROGRAM: iTerm.app
$SHELL: /usr/local/bin/bash
$HOME: /Users/joeptacek
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'GNU bash, version 4.4.19(1)-release (x86_64-apple-darwin17.3.0)'
uname -a: 'Darwin 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64'
OS version: Mac 10.13.3 17D102
curl: /usr/bin/curl, curl 7.54.0 (x86_64-apple-darwin17.0) libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
wget: not found
git: /usr/local/bin/git, git version 2.16.2
grep: /usr/bin/grep, 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: v8.10.0
which node: $NVM_DIR/versions/node/v8.10.0/bin/node
which iojs:
which npm: $NVM_DIR/versions/node/v8.10.0/bin/npm
npm config get prefix: $NVM_DIR/versions/node/v8.10.0
npm root -g: $NVM_DIR/versions/node/v8.10.0/lib/node_modules
  • nvm ls output:
Details
         v8.9.3
->      v8.10.0
default -> node (-> v8.10.0)
node -> stable (-> v8.10.0) (default)
stable -> 8.10 (-> v8.10.0) (default)
iojs -> N/A (default)
lts/* -> lts/carbon (-> v8.10.0)
lts/argon -> v4.8.7 (-> N/A)
lts/boron -> v6.13.1 (-> N/A)
lts/carbon -> v8.10.0
  • How did you install nvm? (e.g. install script in readme, Homebrew):

Install via git

  • What steps did you perform?

Tried to install latest LTS, reinstalling global packages from previous latest LTS (not sure if nvm would resolve previous latest correctly)

nvm install --lts --reinstall-packages-from='lts/*'

Also tried more explicitly

nvm install --lts --reinstall-packages-from=8.9.3
  • What happened?

In each case, was informed either

grep: unrecognized option `--reinstall-packages-from=lts/*'
usage: grep [-abcDEFGHhIiJLlmnOoqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
	[-e pattern] [-f file] [--binary-files=value] [--color=when]
	[--context[=num]] [--directories=action] [--label] [--line-buffered]
	[--null] [pattern] [file ...]
Version '--reinstall-packages-from=lts/*' (with LTS filter) not found - try `nvm ls-remote --lts` to browse available versions.

or

grep: unrecognized option `--reinstall-packages-from=8.9.3'
usage: grep [-abcDEFGHhIiJLlmnOoqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
	[-e pattern] [-f file] [--binary-files=value] [--color=when]
	[--context[=num]] [--directories=action] [--label] [--line-buffered]
	[--null] [pattern] [file ...]
Version '--reinstall-packages-from=8.9.3' (with LTS filter) not found - try `nvm ls-remote --lts` to browse available versions.

At any rate this works fine

nvm install --lts
nvm reinstall-packages 8.9.3
  • What did you expect to happen?

I was hoping to install the latest LTS and reinstall global packages from my old LTS. I think I've done something similar in the past without issue. Am I misusing the --reinstall-packages-from= option?

  • Is there anything in any of your profile files (.bashrc, .bash_profile, .zshrc, etc) that modifies the PATH?
# in .bashrc, sourced from .bash_profile
export PATH="/usr/local/bin:$PATH"
export PATH="$HOME/bin:$PATH"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsOh no, something's broken :-(installing nodeIssues with installing node/io.js versions.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions