Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin error! "hypurr" when decorating decorateConfig #11

Open
chrionix opened this issue Jan 14, 2023 · 20 comments
Open

Plugin error! "hypurr" when decorating decorateConfig #11

chrionix opened this issue Jan 14, 2023 · 20 comments
Labels
bug Something isn't working

Comments

@chrionix
Copy link

As per the subject, I've tried with and without version numbers, with no success.

@asrvd
Copy link
Member

asrvd commented Jan 14, 2023

can you please explain what are you trying to do and also paste the whole error

@sharpenedblade
Copy link

The error occurs on the latest 4.x.x canary builds, probably because of a breaking change somewhere.

@asrvd
Copy link
Member

asrvd commented Jan 15, 2023

The error occurs on the latest 4.x.x canary builds, probably because of a breaking change somewhere.

will look into it

@asrvd asrvd added the bug Something isn't working label Jan 15, 2023
@asrvd
Copy link
Member

asrvd commented Jan 15, 2023

@chrionix @sharpenedblade i dont think i can do anything about it for now, i doubt that it may break things for people not using the canary build, do you guys have any suggestions?

@asrvd
Copy link
Member

asrvd commented Jan 15, 2023

moreover, documentation for the canary build is nowhere to be found :(

@sharpenedblade
Copy link

Actually it sometimes happens on the latest stable.

moreover, documentation for the canary build is nowhere to be found :(
The only docs are in the release notes for now.

@sharpenedblade
Copy link

I am using macos, could it be related.

@asrvd
Copy link
Member

asrvd commented Jan 16, 2023

I am using macos, could it be related.

not really sure, i use windows and haven't got any errors 🤔 will need more context on this

@asrvd asrvd closed this as completed Jan 16, 2023
@asrvd asrvd reopened this Jan 16, 2023
@asrvd
Copy link
Member

asrvd commented Jan 16, 2023

closed by mistake, will leave this open so that more people can report this

@sharpenedblade
Copy link

So I tried to get logs, but when I open the devtools console, I dont see any errors.

@sharpenedblade
Copy link

sharpenedblade commented Jan 16, 2023

After some investigation, I realized that the error happens when catppuccinTheme is not set in your config. The canary build moved to json config, so it could be related.

The error comes from

const theme = palettes[config.catppuccinTheme.toLowerCase() || "macchiato"];

in decorateConfig in index.js

@sharpenedblade
Copy link

After messing with the new config file, I discovered that setting catppuccinTheme in the config file, then restarting hyper makes this plugin work. I think the README should tell people that they have to set catppuccinTheme, because right now its makes it seem optional.

@asrvd
Copy link
Member

asrvd commented Jan 17, 2023

After messing with the new config file, I discovered that setting catppuccinTheme in the config file, then restarting hyper makes this plugin work. I think the README should tell people that they have to set catppuccinTheme, because right now its makes it seem optional.

alright, thanks a lot for helping out, really appreciate this ❤️

@asrvd
Copy link
Member

asrvd commented Jan 17, 2023

@chrionix can you check and let us know if you have set the catppuccinTheme in your config file?

@asrvd
Copy link
Member

asrvd commented Jan 17, 2023

I think this might solve the issue -

const themeName = config.catppuccinTheme ? config.catppuccinTheme.toLowerCase() : "macchiato";
const theme = palettes[themeName];

previously I was doing -

const theme = palettes[config.catppuccinTheme.toLowerCase() || "macchiato"];

@asrvd
Copy link
Member

asrvd commented Jan 17, 2023

the thing is, in the stable builds even not setting the catppuccinTheme works, not really sure what they are doing differently in canary version

@sharpenedblade
Copy link

sharpenedblade commented Jan 17, 2023

the thing is, in the stable builds even not setting the catppuccinTheme works, not really sure what they are doing differently in canary version

It doesn't work in the latest stable for me. Are you using 3.4.1?

@ccubed
Copy link

ccubed commented Jan 18, 2024

Just wanted to note that I get the same error and that adding catppuccinTheme to the config file does make the error go away.

@ldeveber
Copy link

Also confirming that adding catppuccinTheme to the config fixes this for Hyper 3.4.1.

I would update

hyper/index.js

Line 107 in 8281b8f

const theme = palettes[config.catppuccinTheme.toLowerCase() || "macchiato"];

to

  const theme =  palettes[config.catppuccinTheme ? config.catppuccinTheme.toLowerCase()] || palettes.macchiato;

@Hororohoruru
Copy link

Hello, I just added the plugin to Hyper but it is not working... I added decorateconfig manually to index.js but my terminal is still using the default theme...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants