hyper: Cannot install plugins using `hyper i {plugin}`
- I am on the latest Hyper.app version
- I have searched the issues of this repo and believe that this is not a duplicate
- OS version and name: macOS Mojave 10.14.3
- Hyper.app version: 3.0.0-canary.8
- Link of a Gist with the contents of your .hyper.js: https://gist.github.com/mikemcbride/8b540c761670b3b2f5c6020deb09c60c
- Relevant information from devtools: No abnormal logs in devtools
- The issue is reproducible in vanilla Hyper.app: Yes
Issue
Using hyper i [plugin_name], I am getting the same error every time:
~ » hyper i hypercwd
/Applications/Hyper.app/Contents/Resources/bin/cli.js:19153
getProperties = memoize(() => getParsedFile().program.body[0].expression.right.properties),
^
TypeError: Cannot read property 'properties' of undefined
at memoize (/Applications/Hyper.app/Contents/Resources/bin/cli.js:19153:85)
at d (/Applications/Hyper.app/Contents/Resources/bin/cli.js:19138:22)
at memoize (/Applications/Hyper.app/Contents/Resources/bin/cli.js:19154:34)
at d (/Applications/Hyper.app/Contents/Resources/bin/cli.js:19138:22)
at Object.install (/Applications/Hyper.app/Contents/Resources/bin/cli.js:19184:37)
at Args.args.command (/Applications/Hyper.app/Contents/Resources/bin/cli.js:9934:45)
at Args.runCommand (/Applications/Hyper.app/Contents/Resources/bin/cli.js:11318:37)
at Args.module.exports [as parse] (/Applications/Hyper.app/Contents/Resources/bin/cli.js:15089:10)
at main (/Applications/Hyper.app/Contents/Resources/bin/cli.js:9991:18)
at Object.module.exports.name (/Applications/Hyper.app/Contents/Resources/bin/cli.js:10038:1)
It looks like this line is the offender, but I’m not sure what’s causing the error. I have not yet tried building Hyper and running locally, but I could do that and add some logging to try and determine the root cause if there’s not enough information here.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 35
another one here with the exact same message after updating to
3.0.0…this does seem to be specifically CLI related though, because when I add the plugin names to my
.hyper.jsconfig file, the listed plugins install and activate without any issue.Not fixed for me @ 3.0.2, macOS. I’ve tried making the config file a symlink - didn’t help.
After running Hyper locally and modifying the
cli/api.jsfile to log out some more info, it looks like thegetPropertiesfunction is grabbing the wrong item from the parsed file. Inside ofmemoize:The object at index 0 doesn’t have a
right(nor aleft) key. However,getParsedFile().program.bodyhas two objects in the array, and the item at index 1 does have a right and a left. When I modify the function locally to useprogram.body[1]it works as expected.I’m not sure where to go from there - it seems like maybe there’s a way to detect if it’s missing and try the other one, but I don’t want to make too many assumptions. I’m not familiar enough with the internals here to guess as to why index 1 works and index 0 doesn’t, so hopefully someone else knows why it might be happening.
Hi,
@ZaLiTHkA Thanks!.
I have executed this, but to apply the changes in the $APPDATA/Hyper/.hyper.js file have created a symbolic link.
Example:
Its happening with every hyper command not only
install, getting the same error withhyper listI just managed to reproduce the
TypeError: Cannot read property 'properties' of undefinederror from the OP…I renamed both
$APPDATA/Hyper/.hyper.jsand$USERPROFILE/.hyper.jsfiles and relaunched Hyper, at which point it only recreated$APPDATA/Hyper/.hyper.jsandhyper liststarted throwing this error.I then updated the new file with my personal settings and copied it over to
$USERPROFILE/.hyper.jsand the CLI commands started working again.hope that helps a bit. O.o
The 3.0.2 release did not seem to work for me (as others above also reported). I was able to get this working locally by modifying the
cli.jsfile and cut a PR with the change. I’m not sure if it’s the right approach but it does seem to fix the issue… 🤞Looks like it’s fixed in 3.0.2. Initially after updating and also reinstalling was getting the same error “TypeError: Cannot read property ‘properties’ of undefined” but then I deleted .hyper.js file in Home Directory, deleted /usr/local/bin/hyper and resintalled Hyper and modified .hyper.js (don’t replace old one, just modify the new file) now it’s all smooth.
hyper i, hyper list all working fine now.
OS version and name: macOS Mojave 10.15.2 Hyper.app version: 3.0.2
Update to 3.0.2 fixed the issue for me. I can now install plugins 😄 love it!!! Nice quick reaction!!!
@mikemcbride I’m more of a Windows/Linux guy myself, but we do have a Mac here at work that I use quite often, I’ll see if I can work out the file locations just now… so unless you come right in the meantime, I might have some more info for you on that shortly.
@jjakj1 there was a
3.0.2update released a few hours back that includes a fix for the config file paths, but as far as I understand this is only fixed from the setup package… so I believe if you did a fresh install as opposed to an in-place update, then in theory you shouldn’t have this problem.oh awesome, I didn’t think of using a symlink yesterday, but that actually works perfectly. thanks. 😃
for the project maintainers: it seems like the Hyper app itself and the
hyperCLI command are looking at different paths for the config file, but in the meantime, creating a symlink as @xxmlud has suggested now seems like a good workaround:@ZaLiTHkA wow that worked perfectly! Thanks
aha, you’re dead on there…
$USERPROFILE/.hyper.jscurrently has:Same here, hyper 3.0.0. on Windows 10 (10.0.17763), trying to install plugins or themes results in the cannot read property error.