vercel / hyper

A terminal built on web technologies
https://hyper.is
MIT License
43.27k stars 3.52k forks source link

Hyper won't install any plugins either through config file or through the new hyper CLI method #3132

Closed jcklpe closed 6 years ago

jcklpe commented 6 years ago

Issue

I have just installed Hyper on my computer. I have it hooked up to bash through WSL. I have symlinked all my config files in WSL home to a dropbox folder in Windows so that I can edit the files more easily, but also so that I can have backups and keep different machines in sync.

I am unable to install plugins through the website using the CLI hyperpower -i command.

I am also unable to install plugins by manually changing my .hyper.js file. When I try to save it with a new plugin name in the config file, package.json throws an error.

image

My situation seems to be similar to this issue here: https://github.com/zeit/hyper/issues/1944

jcklpe commented 6 years ago

Oookay.... so I've borked some stuff up further it seems. I was having trouble with my zsh installation so I tried uninstalling and reinstalling Hyper and when I did I got this message:

image

jcklpe commented 6 years ago

I think the issue might be due to NPM being incorrectly installed in WSL or something? I'm getting a little burnt out trying to figure this out though.

jcklpe commented 6 years ago

I've got an update.

I uninstalled everything down to getting rid of WSL entirely. Then I reinstalled it, reinstalled zsh, got all my configs for that set up with the vanilla Ubuntu terminal for WSL. Wanted to make sure everything works that was supposed to. It works. ✔️

Then I installed Hyper. It worked ✔️

Then I closed Hyper and symlinked from within WSL a connection between my Windows home directory where .hyper.js was appearing, and the config files in my dropbox folders. It did not work. Really wonked out Hyper. ❌

So then I deleted those symlinks and instead made them in Windows rather than in bash. This worked ✔️

But then whenever I tried to change anything in the settings for hyper.js it would throw the package.json error again. ❌

So basically... I'm pretty sure there's some symlink issue. And going through the archives it seems there's a couple of people who have had similar problems espc with WSL.

I know the easy way around this is to just give up and use the default file locations and then use the hyper sync application, but I want to use my symlinks dadgumit! Mostly because I'm just breaking stuff apart to try to learn to be a better dev.

Are there any solutions for this?

colbin8r commented 6 years ago

@thedonquixotic I've run into the same issue in the past. I believe the problem is with chokidar, the package that is tasked with watching Hyper's config files with changes (if my memory serves me right). Check out this issue, and I'm sure there's many more across gaze and chokidar.

A way I've been able to keep my Hyper installation synced across machines successfully is to

This way, any changes I make on one machine are synced to another through Dropbox. You'll have to have Node running on Windows, or perhaps use Node in your WSL install and change the OS environment variable (although I haven't tested this method) to install the Hyper packages.

Hope this helps!

1944

jcklpe commented 6 years ago

@colbin8r Your solution is actually exactly what I've been doing. Down to using Link Shell Extension! It's a great tool :) I always get confused writing symlinks by hand and being able to drop the link using the gui is great!

Sadly that doesn't fix the issue for me :(

And even though I'm now using stuff just from root I'm getting a bunch of error messages still. Some of my themes are also not working! They don't have the glow or animation effects they used to have. Which makes me think that maybe the error messages are being thrown by those things and the symlink is separate?

image

colbin8r commented 6 years ago

@thedonquixotic Can you post your .hyper.js?

jcklpe commented 6 years ago

I actually figured out what was causing that javascript pop up. Lots of my plugins are broken and not working for Hyper 2 it seems. I can retry symlinking stuff and see if that works but I have to go to a meeting in a little bit so I'll try that later tonight. I'm also trying to fix the hyperpunk theme to work on Hyper 2 and I've isolated the issue to being something to do with the chance from hyper 1 to hyper 2 with hyper 2 using styled-jsx now, but I don't really know react very well so I can't quite figure out the syntax. Oof. Guess is just the way to learn!

jcklpe commented 6 years ago

Okay.... so actually it's still having problems with package.json errors and I'm not really sure what to do about it. Here is my current .hyper.js

// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.

module.exports = {
  config: {
    // choose either `'stable'` for receiving highly polished,
    // or `'canary'` for less polished but more frequent updates
    updateChannel: 'stable',

    // default font size in pixels for all tabs
    fontSize: 18,

    // font family with optional fallbacks
    fontFamily: 'PowerlineSymbols, Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',

    // default font weight: 'normal' or 'bold'
    fontWeight: 'normal',

    // font weight for bold characters: 'normal' or 'bold'
    fontWeightBold: 'bold',

    // terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
    cursorColor: 'rgba(248,28,229,0.8)',

    // terminal text color under BLOCK cursor
    cursorAccentColor: '#000',

    // `'BEAM'` for |, `'UNDERLINE'` for _, `'BLOCK'` for █
    cursorShape: 'BLOCK',

    // set to `true` (without backticks and without quotes) for blinking cursor
    cursorBlink: false,

    // color of the text
    foregroundColor: '#fff',

    // terminal background color
    // opacity is only supported on macOS
    backgroundColor: '#000',

    // terminal selection color
    selectionColor: 'rgba(248,28,229,0.3)',

    // border color (window, tabs)
    borderColor: '#333',

    // custom CSS to embed in the main window
    css: '',

    // custom CSS to embed in the terminal window
    termCSS: '',

    // if you're using a Linux setup which show native menus, set to false
    // default: `true` on Linux, `true` on Windows, ignored on macOS
    showHamburgerMenu: '',

    // set to `false` (without backticks and without quotes) if you want to hide the minimize, maximize and close buttons
    // additionally, set to `'left'` if you want them on the left, like in Ubuntu
    // default: `true` (without backticks and without quotes) on Windows and Linux, ignored on macOS
    showWindowControls: '',

    // custom padding (CSS format, i.e.: `top right bottom left`)
    padding: '12px 14px',

    // the full list. if you're going to provide the full color palette,
    // including the 6 x 6 color cubes and the grayscale map, just provide
    // an array here instead of a color map object
    colors: {
      black: '#000000',
      red: '#C51E14',
      green: '#1DC121',
      yellow: '#C7C329',
      blue: '#0A2FC4',
      magenta: '#C839C5',
      cyan: '#20C5C6',
      white: '#C7C7C7',
      lightBlack: '#686868',
      lightRed: '#FD6F6B',
      lightGreen: '#67F86F',
      lightYellow: '#FFFA72',
      lightBlue: '#6A76FB',
      lightMagenta: '#FD7CFC',
      lightCyan: '#68FDFE',
      lightWhite: '#FFFFFF',
    },

    // 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: ['--login'],

    // for environment variables
    env: {},

    // set to `false` for no bell
    bell: 'SOUND',

    // if `true` (without backticks and without quotes), selected text will automatically be copied to the clipboard
    copyOnSelect: false,

    // if `true` (without backticks and without quotes), hyper will be set as the default protocol client for SSH
    defaultSSHApp: true,

    // if `true` (without backticks and without quotes), on right click selected text will be copied or pasted if no
    // selection is present (`true` by default on Windows and disables the context menu feature)
    // quickEdit: true,

    // URL to custom bell
    // bellSoundURL: 'http://example.com/bell.mp3',

    // for advanced config flags please refer to https://hyper.is/#cfg

    // hyperBorder: {
    //   // borderColors: ['random','random'],
    //   borderColors: ['#101E1A','#21D17D'],
    // }

  },

  // a list of plugins to fetch and install from npm
  // format: [@org/]project[#version]
  // examples:
  //   `hyperpower`
  //   `@company/project`
  //   `project#1.0.1`
  plugins: [
    'hyperterm-tabs',
    'hypertheme',
    'hyperterm-blink',
    //'hyper-transparent-bg', does not work on Windows
    'hyperborder',
    'hyperterm-paste',
    'hyperterm-alternatescroll',
    'hyperterm-bold-tab',
    'hyperterm-dibdabs',
    'hyperlinks',
    'hyper-alt-click',
    'hyper-match',
    'hyperterm-crosshair',
    'hyper-autohide-tabs',
    'hyper-tabs-enhanced',
    'hyper-pane',
    //'hyper-hover-header',
    //'hyper-background',
    'gitrocket',
    'space-pull',
    //'hyper-stylesheet',
    //"hyper-always-on-top",
    // 𝑻𝑯𝑬𝑴𝑬𝑺
    //'hyper-oldschool',
    'hyperatompunk',
     //'hyperpunk',
    //'hyperterm-retro',

    //'hyperblue-vibrancy',
    //'hyper-mahoushoujo',
    //'hypermaterial-vibrancy'
  ],

  // in development, you can create a directory under
  // `~/.hyper_plugins/local/` and include it here
  // to load it and avoid it being `npm install`ed
  localPlugins: [],

  keymaps: {
    // Example
    // 'window:devtools': 'cmd+alt+o',
  },
};

// this is the version that is in my drobpox folder
jcklpe commented 6 years ago

Also got these log file errors. Seems like maybe it's something to do with yarn.

Arguments: 
  C:\Users\David\AppData\Local\hyper\app-2.0.0\Hyper.exe C:\Users\David\AppData\Local\hyper\app-2.0.0\resources\bin\yarn-standalone.js install --no-emoji --no-lockfile --cache-folder C:\Users\David\.hyper_plugins\cache

PATH: 
  C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Python37\Scripts\;C:\Python37\;C:\ProgramData\Boxstarter;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\Microsoft VS Code\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;C:\Program Files\Git LFS;C:\Program Files\TortoiseGit\bin;C:\Program Files\nodejs\;C:\Program Files (x86)\Yarn\bin\;C:\Users\David\AppData\Local\Microsoft\WindowsApps;C:\Users\David\AppData\Local\Pandoc\;C:\Users\David\AppData\Roaming\npm;C:\Users\David\AppData\Local\Yarn\bin;C:\Users\David\AppData\Local\hyper\app-2.0.0\resources\bin

Yarn version: 
  1.3.2

Node version: 
  8.2.1

Platform: 
  win32 x64

npm manifest: 
  {
    "name": "hyper-plugins",
    "description": "Auto-generated from `~/.hyper.js`!",
    "private": true,
    "version": "0.0.1",
    "repository": "zeit/hyper",
    "license": "MIT",
    "homepage": "https://hyper.is",
    "dependencies": {
      "hyperterm-tabs": "latest",
      "hypertheme": "latest",
      "hyperterm-blink": "latest",
      "hyperborder": "latest",
      "hyperterm-icons": "latest",
      "hyperterm-paste": "latest",
      "hyperterm-alternatescroll": "latest",
      "hyperterm-bold-tab": "latest",
      "hyperterm-dibdabs": "latest",
      "hyperlinks": "latest",
      "hyper-alt-click": "latest",
      "hyper-match": "latest",
      "hyperterm-crosshair": "latest",
      "hyper-autohide-tabs": "latest",
      "hyper-tabs-enhanced": "latest",
      "hyper-pane": "latest",
      "hyper-hover-header": "latest",
      "hyper-background": "latest",
      "gitrocket": "latest",
      "space-pull": "latest",
      "hyperatompunk": "latest"
    }
  }

yarn manifest: 
  No manifest

Lockfile: 
  No lockfile

Trace: 
  Error: https://registry.yarnpkg.com/hyperterm-icons: Not found
      at Request.params.callback [as _callback] (C:\Users\David\AppData\Local\hyper\app-2.0.0\resources\bin\yarn-standalone.js:65368:18)
      at Request.self.callback (C:\Users\David\AppData\Local\hyper\app-2.0.0\resources\bin\yarn-standalone.js:121753:22)
      at emitTwo (events.js:125:13)
      at Request.emit (events.js:213:7)
      at Request.<anonymous> (C:\Users\David\AppData\Local\hyper\app-2.0.0\resources\bin\yarn-standalone.js:122736:10)
      at emitOne (events.js:115:13)
      at Request.emit (events.js:210:7)
      at IncomingMessage.<anonymous> (C:\Users\David\AppData\Local\hyper\app-2.0.0\resources\bin\yarn-standalone.js:122656:12)
      at Object.onceWrapper (events.js:314:30)
      at emitNone (events.js:110:20)
jcklpe commented 6 years ago

The issue appears to be specific to the hyperpunk, atompunk, oldschool, and retro themes. When I change to mahoushoujo or material vibrancy it does not throw a json error etc.

Also reading the yarn trace, I commented out the enhanced tabs because it seems the icons arent' loading for some reason.

jcklpe commented 6 years ago

I deleted my hyper-plugins folder and rebuilt it and haven't had any problems since. I've disabled a good number of the plugins I had installed because they seem to lack compatibility with Hyper 2 or are obsolete.

Consider this issue resolved.