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.
After running Hyper locally and modifying the cli/api.js
file to log out some more info, it looks like the getProperties
function is grabbing the wrong item from the parsed file. Inside of memoize
:
() => getParsedFile().program.body[0].expression.right.properties
The object at index 0 doesn't have a right
(nor a left
) key. However, getParsedFile().program.body
has 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 use program.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.
I have the same issue with Hyper 3.0.0, Windows 10 1809 with .hyper.js not modified.
hyper list
, hyper install
and hyper uninstall
are not available.
Reinstalling Hyper (+ deletion of AppData\Roaming\Hyper and AppData\Localhyper) does not solve the problem.
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.js
config file, the listed plugins install and activate without any issue.
@peterleif @ZaLiTHkA this is possibly due to #3602
@pcnate Thank you for sharing the information but actually isn't because I deleted old installations manually.
hyper version
and the error message shows that 3.0.0 is running, but there may be some problem on the update process because the problem happened after an update from 2.1.2 to 3.0.0.
@pcnate @peterleif I also don't think that's the root cause. When I run hyper version
I do get 3.0.0
yet I still experience the error.
I have the same problem. On Win10 with version 3.0.0
I used hyper for the first time today so being new to hyper, I thought I did something wrong.
Here is the full error I get
C:\Users\...\AppData\Local\hyper\app-3.0.0\resources\bin\cli.js:19153
getProperties = memoize(() => getParsedFile().program.body[0].expression.right.properties),
^
TypeError: Cannot read property 'properties' of undefined
at memoize (C:\Users\...\AppData\Local\hyper\app-3.0.0\resources\bin\cli.js:19153:85)
at d (C:\Users\...\AppData\Local\hyper\app-3.0.0\resources\bin\cli.js:19138:22)
at memoize (C:\Users\...\AppData\Local\hyper\app-3.0.0\resources\bin\cli.js:19154:34)
at d (C:\Users\...\AppData\Local\hyper\app-3.0.0\resources\bin\cli.js:19138:22)
at Object.install (C:\Users\...\AppData\Local\hyper\app-3.0.0\resources\bin\cli.js:19184:37)
at Args.args.command (C:\Users\...\AppData\Local\hyper\app-3.0.0\resources\bin\cli.js:9934:45)
at Args.runCommand (C:\Users\...\AppData\Local\hyper\app-3.0.0\resources\bin\cli.js:11318:37)
at Args.module.exports [as parse] (C:\Users\...\AppData\Local\hyper\app-3.0.0\resources\bin\cli.js:15089:10)
at main (C:\Users\...\AppData\Local\hyper\app-3.0.0\resources\bin\cli.js:9991:18)
at Object.module.exports.name (C:\Users\...\AppData\Local\hyper\app-3.0.0\resources\bin\cli.js:10038:1)
I also installed it today for the first time on my mac. It works fine there.
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.
It seems a problem with webpack dependeciy as is described in this link webpack
Here's another confirmation running hyper 3.0.0 on Windows 10.
Same issue here
here's an interesting one... in trying to help debug a different issue, I managed to get hyper install
to work on 3.0.0
. O.o the details of what I did are over here. the only point not mentioned explicitly in that comment is that I didn't rely on the built-in auto updater, but rather downloaded the exe
from the website.
however, I'm not entirely sure if it's actually working properly..
my $APPDATA/Hyper/.hyper.js
file currently has:
plugins: [
'hyper-website-theme',
'hyper-yes',
'hyper-single-instance'
]
but hyper list
shows me:
Andre@Monstrosity MINGW64 ~
$ hyper list
hyper-website-theme
hypercwd
any suggestions on how to verify which plugins are actually installed?
@ZaLiTHkA so the actual list of plugins installed are in %APPDATA%/Hyper/.hyper.js Im guessing its reading the list of plugins in %USERPROFILE%/.hyper.js not the actual list of plugins.
But yeah, the CLI isnt working for me either (hyper version shows 3.0.0) but just adding the plugin to the .hyper.js file works fine.
Its happening with every hyper command not only install
, getting the same error with hyper list
@ZaLiTHkA so the actual list of plugins installed are in %APPDATA%/Hyper/.hyper.js Im guessing its reading the list of plugins in %USERPROFILE%/.hyper.js not the actual list of plugins.
aha, you're dead on there.. $USERPROFILE/.hyper.js
currently has:
plugin: ['hyper-webite-theme', 'hypercwd']
I just managed to reproduce the TypeError: Cannot read property 'properties' of undefined
error from the OP..
I renamed both $APPDATA/Hyper/.hyper.js
and $USERPROFILE/.hyper.js
files and relaunched Hyper, at which point it only recreated $APPDATA/Hyper/.hyper.js
and hyper list
started throwing this error.
I then updated the new file with my personal settings and copied it over to $USERPROFILE/.hyper.js
and the CLI commands started working again.
hope that helps a bit. O.o
@ZaLiTHkA wow that worked perfectly! Thanks
FWIW, I just completely uninstalled Hyper, downloaded the latest from the website, and tried this again but got the same results as before.
I just managed to reproduce the
TypeError: Cannot read property 'properties' of undefined
error from the OP..I renamed both
$APPDATA/Hyper/.hyper.js
and$USERPROFILE/.hyper.js
files and relaunched Hyper, at which point it only recreated$APPDATA/Hyper/.hyper.js
andhyper list
started throwing this error.I then updated the new file with my personal settings and copied it over to
$USERPROFILE/.hyper.js
and the CLI commands started working again.hope that helps a bit. O.o
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:
C:\Users\user>mklink "C:\Users\user\.hyper.js" "C:\Users\user\AppData\Roaming\Hyper\.hyper.js"
v铆nculo simb贸lico creado para C:\Users\user\.hyper.js <<===>> C:\Users\user\AppData\Roaming\Hyper\.hyper.js
C:\Users\user>dir | findstr "hyper"
07/05/2019 22:39 <SYMLINK> .hyper.js [C:\Users\user\AppData\Roaming\Hyper\.hyper.js]
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 hyper
CLI 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:
Andre@Monstrosity MINGW64 ~
$ hyper list
hyper-website-theme
hypercwd
hyper-yes
hyper-single-instance
Andre@Monstrosity MINGW64 ~
$ hyper install hyper-search
hyper-search installed successfully!
Andre@Monstrosity MINGW64 ~
$ hyper list
hyper-website-theme
hypercwd
hyper-yes
hyper-single-instance
hyper-search
This fails for me on a fresh install. Google brought me here. How can we find where cli looks for the .hyper.js vs where the terminal looks for it?
@voronoipotato, try the symbolic link idea that @xxmlud posted just two comments before you. That should help until it's fixed in the app.
I'm a new user so I've not actually gotten to see it working. I'm just going to wait till it's fixed :) but I'm happy to help fix it.
https://github.com/zeit/hyper/blob/2d399baa87fa52388d3d25719dce3678842e2c56/app/index.js#L4
https://github.com/zeit/hyper/blob/27c1893fb82dde78b5686c9034ac3268395198f2/cli/api.js#L9
This looks somewhat promising.
I'm seeing a lot of users reporting that @ZaLiTHkA's solution with a symlink worked for them. AFAIK, that's only going to work for Windows users. For those of us on macOS, I'm not sure of a similar solution. I did a search for a .hyper.js
file in the app's packaged contents and found nothing, so I don't think we're able to do a similar symlink.
Anyone else on macOS found a workaround?
I installed hyper today, and I met the same problem. However, after I add the same variables to the System variables and restart the computer. the command like hyper i hypercwd
, it worked. Though I don't why, I hope this may help you.
@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.2
update 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.
Update to 3.0.2 fixed the issue for me. I can now install plugins :D love it!!! Nice quick reaction!!!
Not fixed for me @ 3.0.2, macOS. I've tried making the config file a symlink - didn't help.
hi there, bumping this because i have the same issue on a linux box with 3.0.2.
@voronoipotato would you like to work on this issue and make a PR?
I have the same problem here.
macOS Mojave Version 10.14.6
$ hyper i hyper-pane
/Applications/Hyper.app/Contents/Resources/bin/cli.js:19156
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:19156:85)
at d (/Applications/Hyper.app/Contents/Resources/bin/cli.js:19141:22)
at memoize (/Applications/Hyper.app/Contents/Resources/bin/cli.js:19157:34)
at d (/Applications/Hyper.app/Contents/Resources/bin/cli.js:19141:22)
at Object.install (/Applications/Hyper.app/Contents/Resources/bin/cli.js:19187: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)
$ hyper list
/Applications/Hyper.app/Contents/Resources/bin/cli.js:19156
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:19156:85)
at d (/Applications/Hyper.app/Contents/Resources/bin/cli.js:19141:22)
at memoize (/Applications/Hyper.app/Contents/Resources/bin/cli.js:19157:34)
at d (/Applications/Hyper.app/Contents/Resources/bin/cli.js:19141:22)
at Object.list (/Applications/Hyper.app/Contents/Resources/bin/cli.js:19205:26)
at Args.args.command (/Applications/Hyper.app/Contents/Resources/bin/cli.js:9943:15)
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)
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
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.js
file 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... 馃
Most helpful comment
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.js
config file, the listed plugins install and activate without any issue.