hyper icon indicating copy to clipboard operation
hyper copied to clipboard

Getting JavaScript Error when opening new Tab in Hyper

Open JBarker90 opened this issue 3 years ago • 5 comments

  • [x] I am on the latest Hyper.app version
  • [x] I have searched the issues of this repo and believe that this is not a duplicate
  • OS version and name: Windows 10 x64 Version 10.0.19044 Build 19044
  • Hyper.app version: 3.2.3
  • Link of a Gist with the contents of your .hyper.js: https://gist.github.com/JBarker90/1ac22bdd5d99d2213d292c1e242474f4
  • Relevant information from devtools (CMD+ALT+I on macOS, CTRL+SHIFT+I elsewhere):
  • The issue is reproducible in vanilla Hyper.app:

Issue

I recently updated Hyper terminal to Version 3.2.3 and now am noticing that I get a JavaScript Error when trying to open a new tab. I did come across some older GitHub issues where others ran into the same error. But the resolution was to remove the hypercwd plugin. This doesn't apply in my case because I don't have any plugins installed. If anyone can help troubleshoot this issue, it would be much appreciated! Thanks! JavaScript Error

JBarker90 avatar Jul 07 '22 16:07 JBarker90

Can you check the shell path once, that error code is generally there when path doesn't exist

LabhanshAgrawal avatar Jul 07 '22 18:07 LabhanshAgrawal

So the shell path does exist and is pointing correctly to the install location of Cygwin64 (which is the default install path).

        // Cygwin
        // - Example: `C:\\cygwin64\\bin\\bash.exe`
        shell: 'C:\\cygwin64\\bin\\bash.exe',
	
        // for setting shell arguments (i.e. for using interactive shellArgs: `['-i']`)
        // by default `['--login']` will be used
        shellArgs: ['--login'],
        // for environment variables
        env: {
		TERM: 'cygwin',
	},

JBarker90 avatar Jul 08 '22 15:07 JBarker90

try once with env: {} and shellArgs: []

LabhanshAgrawal avatar Jul 12 '22 06:07 LabhanshAgrawal

So removing the values for env and shellArgs fixed the error.

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

But now bash commands can't be found. Are there recommended configurations I can use in .hyper.js to configure Cygwin Bash in Hyper?

jonat@Beastmaster /cygdrive/c/Users/jonat
$ ls
bash: ls: command not found
jonat@Beastmaster /cygdrive/c/Users/jonat
$ clear
bash: clear: command not found

JBarker90 avatar Jul 15 '22 15:07 JBarker90

So removing the values for env and shellArgs fixed the error.

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

But now bash commands can't be found. Are there recommended configurations I can use in .hyper.js to configure Cygwin Bash in Hyper?

jonat@Beastmaster /cygdrive/c/Users/jonat
$ ls
bash: ls: command not found
jonat@Beastmaster /cygdrive/c/Users/jonat
$ clear
bash: clear: command not found

New tab work, but need testing more.

        shell: 'C:\\cygwin\\Cygwin.bat',
	shellArgs: [],
        env: {
		TERM: 'cygwin',
	  },

itshikanov avatar Dec 19 '22 12:12 itshikanov

This is fixed in canary release, you can set updateChannel: "canary" to use canary builds, or set preserveCWD: false for the time being.

LabhanshAgrawal avatar Jun 16 '23 20:06 LabhanshAgrawal