hyper icon indicating copy to clipboard operation
hyper copied to clipboard

Hyper CLI command not installed if /usr/local/bin doesn't exist

Open colinhemphill opened this issue 8 years ago • 34 comments

  • [x] I am on the latest Hyper.app version

  • [x] I have searched the issues of this repo and believe that this is not a duplicate

  • OS version and name: MacOS 10.13.4

  • Hyper.app version: 2.0.0

  • Link of a Gist with the contents of your .hyper.js: https://gist.github.com/colinhemphill/04a4c1e91a89ac2958e679581e38fb26

  • The issue is reproducible in vanilla Hyper.app: Is Vanilla

Issue

I updated to 2.0.0, and the hyper commands aren't working for me. From poking around in documentation, it doesn't look like I'm supposed to do anything to have access to the CLI, but maybe I'm wrong.

bash: hyper: command not found

screen shot 2018-04-16 at 11 33 39 am

colinhemphill avatar Apr 16 '18 16:04 colinhemphill

Got it to work. Had to install it via NPM and reboot. Dunno why it didn't install by default.

jacksonhvisuals avatar May 15 '18 20:05 jacksonhvisuals

@jacksonhvisuals how did you install via npm?

jakobereksen avatar Jun 27 '18 12:06 jakobereksen

Actually, I think all I ended up doing was installing hyperpower and rebooting... which shouldn't have fixed the issue, but it did. @jakobereksen

jacksonhvisuals avatar Jun 27 '18 13:06 jacksonhvisuals

ok thank you. that did not work for me though. Even though I did install hyper through brew cask on my admin user, the install failed silently, because my default user did not have write permissions for usr/local/bin. I temporarily enabled my default user to write in that directory and the install worked. Still a weird behaviour, since all other programs I had installed before the same way did not have problems of that sort.

jakobereksen avatar Jun 28 '18 00:06 jakobereksen

Sorry if bumping the thread or anything along the lines.

I installed Hyper on a brand new OSX installation - In my case I didn't get the symbolic link on /usr/local/bin and had to create it manually using - sudo ln -s /Applications/Hyper.app/Contents/Resources/bin/hyper /usr/local/bin/hyper which fixed the problem 👍

bkjoel avatar Dec 29 '18 23:12 bkjoel

@chabou I was thinking of helping with this issue. I’m not familiar with MacOS installations (the whole drag to applications shazam).

After fiddling with the source I was able to find ‘app/utils/cli-install.js’ which had a part where it tried to create a symlink in ‘/usr/local/bin’ and figured it ran on installation.

I believe this is the root of the problem in cases where the symlink isn’t created (not in cases where the folder doesn’t exist, although a check could be performed there prompting the folder’s creation) - ‘/usr/local/bin’ comes with writing permissions only for Root (specifically Wheel group?) on brand new MacOS installations.

The question is whether the installation process runs on higher privileges and if not whether it should. Either way I think the default permissions on ’/usr/local/bin’ are the main problem.

Can we run the installation on higher privileges? Should we modify ‘/usr/local/bin’ write permissions?

bkjoel avatar Jan 21 '19 12:01 bkjoel

Sorry if bumping the thread or anything along the lines.

I installed Hyper on a brand new OSX installation - In my case I didn't get the symbolic link on /usr/local/bin and had to create it manually using - sudo ln -s /Applications/Hyper.app/Contents/Resources/bin/hyper /usr/local/bin/hyper which fixed the problem 👍

This worked for me. Thanks

scottyzen avatar Feb 04 '19 20:02 scottyzen

I can recreate this in my OSX environment...

  1. Download and unzip Hyper
  2. Open Hyper after you download (it appears the /usr/local/bin link will link to where ever that is you first started it from - my case was the download temp directory in the browser)
  3. The link will be broken once you close that hyper instance
  4. Once you drag the app to "Applications" it will be broken also

I fixed it by the following

rm /usr/local/bin/hyper
ln -s /Applications/Hyper.app/Contents/Resources/bin/hyper /usr/local/bin/hyper
ls -lah /usr/local/bin/hyper

The last command checks it.

andersab avatar Mar 02 '19 16:03 andersab

I can recreate this in my OSX environment...

  1. Download and unzip Hyper
  2. Open Hyper after you download (it appears the /usr/local/bin link will link to where ever that is you first started it from - my case was the download temp directory in the browser)
  3. The link will be broken once you close that hyper instance
  4. Once you drag the app to "Applications" it will be broken also

I fixed it by the following

rm /usr/local/bin/hyper
ln -s /Applications/Hyper.app/Contents/Resources/bin/hyper /usr/local/bin/hyper
ls -lah /usr/local/bin/hyper

The last command checks it.

Great, It's work for me!

felipevegners avatar Apr 09 '19 23:04 felipevegners

Sorry if bumping the thread or anything along the lines.

I installed Hyper on a brand new OSX installation - In my case I didn't get the symbolic link on /usr/local/bin and had to create it manually using - sudo ln -s /Applications/Hyper.app/Contents/Resources/bin/hyper /usr/local/bin/hyper which fixed the problem 👍

This worked for me as well. Thanks!

andresayej avatar May 08 '19 08:05 andresayej

I can recreate this in my OSX environment...

  1. Download and unzip Hyper
  2. Open Hyper after you download (it appears the /usr/local/bin link will link to where ever that is you first started it from - my case was the download temp directory in the browser)
  3. The link will be broken once you close that hyper instance
  4. Once you drag the app to "Applications" it will be broken also

I fixed it by the following

rm /usr/local/bin/hyper
ln -s /Applications/Hyper.app/Contents/Resources/bin/hyper /usr/local/bin/hyper
ls -lah /usr/local/bin/hyper

The last command checks it.

Wow this works! Thanks!

fakhriperdana avatar Jun 26 '19 06:06 fakhriperdana

I can recreate this in my OSX environment...

  1. Download and unzip Hyper
  2. Open Hyper after you download (it appears the /usr/local/bin link will link to where ever that is you first started it from - my case was the download temp directory in the browser)
  3. The link will be broken once you close that hyper instance
  4. Once you drag the app to "Applications" it will be broken also

I fixed it by the following

rm /usr/local/bin/hyper
ln -s /Applications/Hyper.app/Contents/Resources/bin/hyper /usr/local/bin/hyper
ls -lah /usr/local/bin/hyper

The last command checks it.

This is more or less exactly what I did today after installing Hyper for the first time, and it's what I came to report. Applying this fix allowed me to use Hyper but led me to this error when installing a theme: https://github.com/zeit/hyper/issues/3648#issuecomment-532355802

argent-codes avatar Sep 17 '19 18:09 argent-codes

Installing hyper.app in macOS Mojave would fail when creating the symlink. Uninstalling then installing via brew cask install hyper successfully created the symlink.

peterjhart avatar Jan 16 '20 17:01 peterjhart

This worked for me, after I created the bin-folder first.

Andersclark avatar Dec 20 '22 15:12 Andersclark