close
Skip to content

Globally installed cli packages not available after NPM install #1954

Description

@Benji-Leboe
  • Operating system and version:
    OSX Mojave 10.14.1
    NVM v. 0.33.11

  • nvm debug output:

Details
nvm --version: v0.33.11
$TERM_PROGRAM: iTerm.app
$SHELL: /bin/zsh
$SHLVL: 1
$HOME: /Users/<user>
$NVM_DIR: '$HOME/.nvm'
$PATH: $HOME/.gem/ruby/2.5.1/bin:$HOME/.rubies/ruby-2.5.1/lib/ruby/gems/2.5.0/bin:$HOME/.rubies/ruby-2.5.1/bin:$HOME/miniconda3/bin:$HOME/bin:/usr/local/bin:/usr/local/sbin:$NVM_DIR/versions/node/v10.12.0/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:$HOME/.rvm/bin:$NVM_DIR/versions/lib/node_modules
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'zsh 5.3 (x86_64-apple-darwin18.0)'
uname -a: 'Darwin 18.2.0 Darwin Kernel Version 18.2.0: Fri Oct 5 19:41:49 PDT 2018; root:xnu-4903.221.2~2/RELEASE_X86_64 x86_64'
OS version: Mac 10.14.1 18B75
curl: /usr/bin/curl, curl 7.54.0 (x86_64-apple-darwin18.0) libcurl/7.54.0 LibreSSL/2.6.4 zlib/1.2.11 nghttp2/1.24.1
wget: not found
git: /usr/local/bin/git
/usr/bin/git, git version 2.18.0
grep: grep: aliased to nocorrect grep --color=auto (nocorrect 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: rm: aliased to rmi (rmi),
mkdir: illegal option -- -
usage: mkdir [-pv] [-m mode] directory ...
mkdir: mkdir: aliased to nocorrect mkdir -p (nocorrect mkdir -p),
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: v10.12.0
which node: $NVM_DIR/versions/node/v10.12.0/bin/node
which iojs: iojs not found
which npm: $NVM_DIR/versions/node/v10.12.0/bin/npm
npm config get prefix: $NVM_DIR/versions
npm root -g: $NVM_DIR/versions/lib/node_modules
  • nvm ls output:
Details
       v10.11.0
->     v10.12.0
        v11.1.0
default -> 10.12.0 (-> v10.12.0)
node -> stable (-> v11.1.0) (default)
stable -> 11.1 (-> v11.1.0) (default)
iojs -> N/A (default)
lts/* -> lts/dubnium (-> N/A)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.14.4 (-> N/A)
lts/carbon -> v8.12.0 (-> N/A)
lts/dubnium -> v10.13.0 (-> N/A)
  • How did you install nvm? (e.g. install script in readme, Homebrew):
    README install script

  • What steps did you perform?
    Attempted to use Expo CLI tools installed globally via NPM

  • What happened?
    Can't execute the expo command. No globally installed modules via NVM can be executed unless installed locally and prefixed with npx

  • What did you expect to happen?
    I should be able to run global cli tools (i.e. expo [command]) but I can't for the life of me figure out how to get my path to recognize the modules installed via NVM

  • Is there anything in any of your profile files (.bashrc, .bash_profile, .zshrc, etc) that modifies the PATH?
    Only adding to it, it doesn't mutate or remove any PATHs

This isn't the first time I've tried to install a global cli tool and get a 'command not found'. It's getting frustrating and I've looked all over the place for documentation about a solution or proper method for global installs.

I've tried manually adding the /.nvm/versions/lib/node_modules to my PATH. Nothing works.

How do I fix this?

Screenshot of attempt to install globally, source my zshrc & then run expo command (even quitting iTerm and reopening does nothing):
screen shot 2018-11-27 at 4 38 01 pm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions