Skip to content

--reinstall-packages-from fails when local repositories are npm link'd #1519

@patrickhulce

Description

@patrickhulce
  • Operating system and version: macOS Sierra 10.12.4

  • nvm debug output:

nvm --version: v0.33.0
$SHELL: /bin/zsh
$HOME: /Users/phulce
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
nvm current: v7.9.0
which node: $NVM_DIR/versions/node/v7.9.0/bin/node
which iojs: iojs not found
which npm: $NVM_DIR/versions/node/v7.9.0/bin/npm
npm config get prefix: $NVM_DIR/versions/node/v7.9.0
npm root -g: $NVM_DIR/versions/node/v7.9.0/lib/node_modules
  • nvm ls output:
         v6.9.5
         v7.2.1
->       v7.9.0
default -> v7.2.1
node -> stable (-> v7.9.0) (default)
stable -> 7.9 (-> v7.9.0) (default)
iojs -> N/A (default)
lts/* -> lts/boron (-> N/A)
lts/argon -> v4.8.2 (-> N/A)
lts/boron -> v6.10.2 (-> N/A)
  • How did you install nvm? (e.g. install script in readme, homebrew):

homebrew

  • What steps did you perform?

Ran nvm install v7.9.0 --reinstall-packages-from=v7.2.1

  • What happened?

Saw errors in the console and no globally installed packages were reinstalled (yarn for example).

Downloading and installing node v7.9.0...
Downloading https://nodejs.org/dist/v7.9.0/node-v7.9.0-darwin-x64.tar.xz...
######################################################################## 100.0%
Computing checksum with shasum -a 256
Checksums matched!
Now using node v7.9.0 (npm v4.2.0)
VERSION=''
xargs: unterminated quote
Reinstalling global packages from v7.2.1...
Linking global packages from v7.2.1...
nvm_cd:cd:2: no such file or directory: /Users/phulce/Code/npm-linked-package-a\n/Users/phulce/Code/npm-linked-package-b\n/Users/phulce/Code/npm-linked-package-c\n/Users/phulce/Code/npm-linked-package-d\n/Users/phulce/Code/npm-linked-package-e
  • What did you expect to happen?

No errors printed to console and globally installed packages from my previous version are available in the new installation (re-linking local packages that are npm link'd would be a nice bonus but I did not expect it :) )

  • Is there anything in any of your profile files (.bashrc, .bash_profile, .zshrc, etc) that modifies the PATH?

Yes before the nvm.sh eval I add a few local

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsOh no, something's broken :-(needs followupWe need some info or action from whoever filed this issue/PR.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions