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

Closed
2 tasks done
colinhemphill opened this issue Apr 16, 2018 · 34 comments · Fixed by #5328
Closed
2 tasks done

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

colinhemphill opened this issue Apr 16, 2018 · 34 comments · Fixed by #5328
Assignees
Labels
⌨️ CLI tool Issue or PR related to CLI tool good first issue Issue is good for Hyper newcomers help wanted Contributions wanted towards the issue 🍎 Platform: Mac Issue pertains to Mac

Comments

@colinhemphill
Copy link

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
Contributor

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

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

@colinhemphill
Copy link
Author

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
Contributor

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

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

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

@chabou
Copy link
Contributor

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

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
Contributor

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.

@chabou chabou added help wanted Contributions wanted towards the issue good first issue Issue is good for Hyper newcomers 🍎 Platform: Mac Issue pertains to Mac labels Apr 16, 2018
@BenDiuguid
Copy link

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

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

@rbukovansky
Copy link

OK. Then why it's not there? 🤕

@dawid-s
Copy link

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

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

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

@sean-roberts
Copy link

@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

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

@jakobereksen
Copy link

@jacksonhvisuals how did you install via npm?

@jacksonhvisuals
Copy link

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

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

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

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

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

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!

@argent-codes
Copy link

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)

@Stanzilla Stanzilla added the ⌨️ CLI tool Issue or PR related to CLI tool label Oct 10, 2019
@peterjhart
Copy link

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

@Andersclark
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⌨️ CLI tool Issue or PR related to CLI tool good first issue Issue is good for Hyper newcomers help wanted Contributions wanted towards the issue 🍎 Platform: Mac Issue pertains to Mac
Projects
None yet
Development

Successfully merging a pull request may close this issue.