The Wayback Machine - https://web.archive.org/web/20201007085816/https://github.com/vercel/hyper/issues/2829
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
colinhemphill opened this issue Apr 16, 2018 · 33 comments
Open

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

colinhemphill opened this issue Apr 16, 2018 · 33 comments

Comments

@colinhemphill
Copy link

@colinhemphill colinhemphill commented Apr 16, 2018

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

@chabou
Copy link
Collaborator

@chabou chabou commented Apr 16, 2018

Can you try to find this symbolic link?

❯ ls -lah /usr/local/bin/hyper
lrwxr-xr-x 1 chabou admin 52 avr 15 14:14 /usr/local/bin/hyper -> /Applications/Hyper.app/Contents/Resources/bin/hyper
@xoche
Copy link

@xoche xoche commented Apr 16, 2018

I just update and I can't even see the prompt text

screen shot 2018-04-16 at 9 54 30 am

@colinhemphill
Copy link
Author

@colinhemphill colinhemphill commented Apr 16, 2018

@chabou It appears /usr/local/bin/hyper doesn't exist on my machine.

@colinhemphill
Copy link
Author

@colinhemphill colinhemphill commented Apr 16, 2018

@xoche I think there's a closed issue for that one: #2826
hyperborder doesn't work with 2.0.0

@chabou
Copy link
Collaborator

@chabou chabou commented Apr 16, 2018

@colinhemphill can you verify that /usr/local/bin/ exists and if you can write inside this directory?

@colinhemphill
Copy link
Author

@colinhemphill colinhemphill commented Apr 16, 2018

@chabou I created the directory after you posted your first question and tried to install Hyper from scratch. This is a brand new Mac and it definitely wasn't there initially. Maybe I need to update the permissions on /usr/local/bin and try again?

@donatoaguirre24
Copy link

@donatoaguirre24 donatoaguirre24 commented Apr 16, 2018

I'm having the same problem in windows 10, I upgraded hyper to version 2.0 but the CLI doesn't work.

image

image

@colinhemphill
Copy link
Author

@colinhemphill colinhemphill commented Apr 16, 2018

@donatoaguirre24, you're problem on Windows might be related to this: #2823

@chabou
Copy link
Collaborator

@chabou chabou commented Apr 16, 2018

@donatoaguirre24 please open "Edit environment variables for your account" dialog https://i.stack.imgur.com/HQPYL.png
Close it to force a refresh of env var cache from registry.

Or simply reboot your Windows.

@colinhemphill
Copy link
Author

@colinhemphill colinhemphill commented Apr 16, 2018

Yeah, it turns out that /usr/local/bin was not on my new Macbook by default, so I had to create the directory and make sure it had writeable permissions. Then a fresh install of Hyper created the link, and the CLI is working for me.

@chabou chabou changed the title Hyper CLI commands not working in 2.0.0 Hyper CLI command not installed if /usr/local/bin doesn't exist Apr 16, 2018
@chabou
Copy link
Collaborator

@chabou chabou commented Apr 16, 2018

After some discussion with @colinhemphill on Slack https://zeit-community.slack.com/archives/C1TMVKPFH/p1523905461000364

It appears that /usr/local/bin could not exists (and not be added to path).
Install homebrew fixed this.

We should take care of that.

@BenDiuguid
Copy link

@BenDiuguid BenDiuguid commented Apr 17, 2018

Worth noting that if you do not have write access to /usr/local/bin, hyper will also fail to install.

At some point my write access got modified, running brew doctor was really helpful for anyone reaching this issue. 😄

@rbukovansky
Copy link

@rbukovansky rbukovansky commented Apr 23, 2018

/usr/local/bin exists on my Mac, but Hyper was not installed there. Permissions issue? Shouldn't Hyper try to install itself there by using elevated permissions?

@albinekb
Copy link
Contributor

@albinekb albinekb commented Apr 23, 2018

No, /usr/local/bin is used for the reason that it does not need elevated permissions 👍

@rbukovansky
Copy link

@rbukovansky rbukovansky commented Apr 23, 2018

OK. Then why it's not there? 🤕

@dawid-s
Copy link

@dawid-s dawid-s commented Apr 27, 2018

No, /usr/local/bin is used for the reason that it does not need elevated permissions +1

Unless you are trying the get it working on a machine where you don't have write permissions in /usr/local/
Wouldn't it make sense to try to symlink to $HOME/.local/bin if it fails to acess /usr/local/bin?

@jacksonhvisuals
Copy link

@jacksonhvisuals jacksonhvisuals commented May 14, 2018

For some reason, on my macOS 10.13.4 installation, installing Hyper from the website didn't install hyper cli command. Checked /usr/local/bin, and it's not there.

@samstr
Copy link

@samstr samstr commented May 14, 2018

Same issue for me. Brand new Macbook Pro. High Sierra 10.13.4 (17E202).

hyper: command not found

Hyper.app installed fine. Well, I dragged it into Applications and executed it without any errors.

Turns out /usr/local/bin didn't exist on my machine.

@imdanielsp
Copy link

@imdanielsp imdanielsp commented May 15, 2018

In my case, /usr/local/bin exists, and I still have the same issue.

@sean-roberts
Copy link

@sean-roberts sean-roberts commented May 15, 2018

@dsantosp12 for me, I think I was in the same boat. I reinstalled it and it worked. My theory is that while setting up this new computer I didn't have it originally and eventually it was added.

@jacksonhvisuals
Copy link

@jacksonhvisuals jacksonhvisuals commented May 15, 2018

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

@jakobereksen
Copy link

@jakobereksen jakobereksen commented Jun 27, 2018

@jacksonhvisuals how did you install via npm?

@jacksonhvisuals
Copy link

@jacksonhvisuals jacksonhvisuals commented Jun 27, 2018

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

@jakobereksen
Copy link

@jakobereksen jakobereksen commented Jun 28, 2018

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.

@bkjoel
Copy link

@bkjoel bkjoel commented Dec 29, 2018

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
Copy link

@bkjoel bkjoel commented Jan 21, 2019

@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?

@scottyzen
Copy link

@scottyzen scottyzen commented Feb 4, 2019

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

@andersab
Copy link

@andersab andersab commented Mar 2, 2019

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.

@felipevegners
Copy link

@felipevegners felipevegners commented Apr 9, 2019

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!

@andresayej
Copy link

@andresayej andresayej commented May 8, 2019

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!

@fakhriperdana
Copy link

@fakhriperdana fakhriperdana commented Jun 26, 2019

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!

@ArgentSun ArgentSun mentioned this issue Sep 17, 2019
2 of 2 tasks complete
@ArgentSun
Copy link

@ArgentSun ArgentSun commented Sep 17, 2019

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: #3648 (comment)

@peterjhart
Copy link

@peterjhart peterjhart commented Jan 16, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.