vercel / hyper

A terminal built on web technologies

Home Page:https://hyper.is

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting JavaScript Error when opening new Tab in Hyper

JBarker90 opened this issue · comments

  • 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 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

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

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',
	},

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

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

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',
	  },

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