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

Created on 15 Jul 2016  ·  18Comments  ·  Source: vercel/hyper

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?

Most helpful comment

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

All 18 comments

To test the hyperpower plugin, you'll need to reload/full reload hyperterm.

After full reload I get: “hyperpower” failed to load in the renderer
process. Check Developer Tools for details.

On Fri, Jul 15, 2016 at 10:22 PM, Manyanda Chitimbo <
[email protected]> wrote:

To test the hyperpower plugin, you'll need to reload/full reload
hyperterm.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/zeit/hyperterm/issues/106#issuecomment-233060320, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAAPO3vnFVrdHt_Bqb-HjXCKwhioKH8Wks5qV-v8gaJpZM4JNv-K
.

Related: #89

This is the culprit:
https://github.com/zeit/hyperterm/blob/master/plugins.js#L191-L193

Basically it's not in the _OSX $PATH_. I welcome ideas on how to fix this. Electron launches the process in a non-user shell, so I'm not 100% sure how to fix this yet.

Any ideas @zcbenz @jlord?

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

@rauchg Yeah, from my log on #89 it runs a different npm and node versions

Uhmm, when running the app in development mode (npm start) the problem does not exist :/

Same issue. I have node and npm installed via nvm. Within the terminal (incl. hyperterm itself) I can npm --version, but hyperterm doesn't seem to be able to find it when editing plugins (adding 'hyperpower' gives the same We could not find the 'npm' command. Make sure it's in $PATH error).

145 related

@montogeek @rauchg could using this help:
https://github.com/sindresorhus/run-node

Not sure if this is something that can be used internally by hyperterm.

@kennetpostigo Yup, it's confirmed to work with nvm. It's based on a lot of research into the problem.

Node.js version: https://github.com/sindresorhus/shell-env

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

Great work, Thanks!

However did you mean to close the issue before the fix was released? I just re-downloaded (via the website) and hit sadness.

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

i m also getting this error. Downloaded Hyperterm yesterday and added some plugins

I'm also getting this same error notification!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

laur1s picture laur1s  ·  3Comments

cooperpellaton picture cooperpellaton  ·  3Comments

yvan-sraka picture yvan-sraka  ·  3Comments

sarneeh picture sarneeh  ·  3Comments

eoinmurray picture eoinmurray  ·  3Comments