hyper: We could not find the 'npm' command. Make sure it's in $PATH

I get this notification from subject.

but

$ which npm
/Users/david/n/bin/npm

works…

Not sure if it’s related, when I add “hyperpower” plugin to .hyperterm.js and save it, nothing really happens and

$ ls .hyperterm_plugins/
local        package.json

Any suggestions ?

Should “hyperpower” plugin install automatically after saving the file and is this not happening because of the problem about not finding ‘npm’ command supposedly?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 18 (8 by maintainers)

Most upvoted comments

I use nvm, but I’ve removed the default alias because it makes new shells about 1s slower to load (compared to ~0s 😄). I added this to my ~/.bash_profile to make HyperTerm work:

# HyperTerm.app runs `bash -ilc env` in an attempt to find npm
if [[ "$(ps -o command= $$)" =~ bash\ -ilc\ env &&
      "$(ps -o command= $PPID)" =~ HyperTerm\.app ]]; then
  nvm use stable
fi

It is already fixed on https://github.com/zeit/hyperterm/pull/172 (awaiting merge), I use nvm, tested it and it works 😃 at least on macOS

Temporary workaround: make npm accessible in /usr/local/bin or /usr/bin