Hyper: 'Module' is undefined. When attempting to edit preferences.

Created on 12 Jul 2017  ยท  16Comments  ยท  Source: vercel/hyper


File > Edit > Preferences
-
image

Hyper 1.3.3
Electron 1.4.16
win32 x64 10.0.15063

High Bug Windows

Most helpful comment

Could this create a simple TAB to edit the setting? Open it with default program sounds insecure solution.

All 16 comments

See #1962
tl;dr - just change the default program to open .js files to notepad (or preferably notepad++/VSC/etc.)

Could this create a simple TAB to edit the setting? Open it with default program sounds insecure solution.

You may want to fix this issue. This error dialog is one of the first things I saw when trying out Hyper, and gave me the incorrect impression that Hyper was buggy and unsupported. I only tried it again and investigated the issue after seeing a recommendation from another user.

I couldn't find the file .hyper.js in the folder above.

I could try creating a UI, although I'm fairly new to the hyper codebase. Would anybody want me to do this?

We are moving away from having stuff in the core @louislva, so please make it as a plugin, if it's good we can include it by default (and move it to the core-plugins) ๐Ÿ‘ And if you need more APIs to do that, (i think it's all possible atm, i have a working branch with such a feature i could share) just open an issue and we'll sort it out ๐Ÿ‘

@albinekb how would I go about a window for preferences and using React? Thanks.

Sorry - why is this closed? I just ran into it. I see there is a workaround, but is there no way for Hyper to handle this?

No, sorry this is out of our control @cfjedimaster, this is a problem with windows defaults/apis.. I have tried to detect this but it's hard to catch all cases and setups that people can have with windows.

Also one big problem for us is that we do not have a dedicated maintainer for windows in the core-team, thus we don't put all the focus and love the windows version really needs.

Some ways to solve it:

  • Check for default editor (as we do now but not 100% correct) and if it's not whitelisted, open notepad
  • Figure out windows APIs to check default editor and use that
  • Skip the external editor and ship hyper with a built in editor like VS Code...
  • Tell people about the workaround and that this is indeed windows-problems.

Fair enough - thanks.

Don't get me wrong, I'd love to fix it! ๐Ÿ˜ƒ But it needs a lot of knowledge about windows together with electron/windows APIs which i don't have.

What do you suggest to fix this now, maybe we should allow users to specify an editor in the .hyper.js file, defaulting to notepad.exe (so that you can change it in the first place)? Would that be an "ok" workaround?

If hyper can detect the error, it would be nice to handle it with a message
at least. Ie, not automatically fix it, but at least note the error and
tell the user what happened. (Then maybe let them click a button to open it
in Notepad.)

On Tue, Oct 17, 2017 at 9:11 AM, Albin Ekblom notifications@github.com
wrote:

Don't get me wrong, I'd love to fix it! ๐Ÿ˜ƒ But it needs a lot of
knowledge about windows together with electron/windows APIs which i don't
have.

What do you suggest to fix this now, maybe we should allow users to
specify an editor in the .hyper.js file, defaulting to notepad.exe (so that
you can change it in the first place)? Would that be an "ok" workaround?

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/zeit/hyper/issues/1996#issuecomment-337244181, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAYBvK-DQjd4mBncM2Wud8zFHBTPi_P3ks5stLWqgaJpZM4OVyX-
.

--

Raymond Camden, Developer Advocate at IBM

Email : [email protected]
Blog : www.raymondcamden.com
Twitter: raymondcamden

Instead of opening an external editor, hyper could just open another tab with the settings in it

Well keep in mind there is also an open bug about new tabs. :\

(For reference: https://github.com/zeit/hyper/issues/2175)

Opening Notepad by default sounds like a reasonable compromise to me. It may not be the greatest editing experience, but it's perfectly serviceable, and it's better than allowing users to encounter an error message.

Should be fixed in the latest canary release: https://github.com/zeit/hyper/releases/tag/2.0.0-canary.11

Was this page helpful?
0 / 5 - 0 ratings

Related issues

laur1s picture laur1s  ยท  3Comments

sarneeh picture sarneeh  ยท  3Comments

juicygoose picture juicygoose  ยท  3Comments

daenuprobst picture daenuprobst  ยท  3Comments

anthonyettinger picture anthonyettinger  ยท  3Comments