hyper: (Bash on Ubuntu on Windows) TypeError: Cannot read property 'resize' of undefined

  • I am on the latest Hyper.app version
  • I have searched the issues of this repo and believe that this is not a duplicate

Issue

I just installed Bash on Ubuntu on Windows and I modified my .hyper.js file in order to force Hyper to open Bash shell. Then, when I open Hyper, an error message appears:

image

// the shell to run when spawning a new session (i.e. /usr/local/bin/fish)
// if left empty, your system's login shell will be used by default
//
// Windows
// - Make sure to use a full path if the binary name doesn't work
// - Remove `--login` in shellArgs
//
// Bash on Windows
// - Example: `C:\\Windows\\System32\\bash.exe`
//
// Powershell on Windows
// - Example: `C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`
shell: 'C:\\Windows\\System32\\bash.exe',

// for setting shell arguments (i.e. for using interactive shellArgs: ['-i'])
// by default ['--login'] will be used
shellArgs: ['--command=usr/bin/bash.exe', '-l', '-i'],

Hyper is closed clicking on OK.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 7
  • Comments: 23 (1 by maintainers)

Most upvoted comments

After digging into it, I have succeeded in solving the issue using the following configuration, inspired from @cfjedimaster:

{
    shell: 'wsl.exe',

    // for setting shell arguments (i.e. for using interactive shellArgs: `['-i']`)
    // by default `['--login']` will be used
    shellArgs: [],
}

Note we need to pass an empty array, not an array with an empty string.

Moreover, I also had to install the Ubuntu package from Windows store, to get all Linux utilities.

This way, I finally got a working terminal! \o/

Ok, so this is what fixed it for me. My shell was cmd.exe and my shellArgs was /c ubuntu. I switched the shell to wsl.exe with no args and it loads now.

Suggest reopening this issue. I just got this again. I think it has something to do with launching hyper on an external monitor, then changing to another external monitor or disconnecting it.

I get this error very regularly. Sometimes hyper just works, and sometimes it crashes this way…

My settings are:

shell: 'C:\\Windows\\System32\\bash.exe',
shellArgs: ['--login'],

I have found a working workaround, first I changed compatibility mode to windows 8 then run hyper, it starts but errors out. close the terminal and change compatibility back to default run hyper and it starts up

I think causing this other error actually sets somethings straight in the application

edit: this workaround does not work with multiple monitors tho…

I never had this issue until upgrading to 2.0.