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

UI/UX bug: invalid JavaScript syntax issue #35389

Open
NawazTalha opened this issue Mar 4, 2025 · 4 comments
Open

UI/UX bug: invalid JavaScript syntax issue #35389

NawazTalha opened this issue Mar 4, 2025 · 4 comments

Comments

@NawazTalha
Copy link

Description:
The default Hygen template in Rocket.Chat contains an invalid JavaScript syntax issue that prevents the generated file from executing properly. The issue is caused by incorrect use of backticks (`) in template literals.

Steps to Reproduce:
Clone the Rocket.Chat repository and navigate to the project directory.
Run the following Hygen command

hygen generator new --name TestComponent --action create

This generates a file at
app/hello.js

ISSUE: const hello = ```
Hello!
This is your first hygen template.

Learn what it can do here:

https://github.com/jondot/hygen

Expected behaviour : const hello = `
Hello!
This is your first Hygen template.

Learn what it can do here:

https://github.com/jondot/hygen
`;

console.log(hello);

The generated hello.js file should contain valid JavaScript code using proper template literals

@NawazTalha NawazTalha changed the title Bug: Invalid JavaScript Syntax in Default Hygen Template fix:fix a bug Mar 4, 2025
@omaraymanatia
Copy link

omaraymanatia commented Mar 4, 2025

I set up the local server of rocket.chat successfully, please assign this issue to me and I will fix this bug

@reetp
Copy link

reetp commented Mar 4, 2025

fix:fix a bug

Please use an appropriate title.

The default Hygen template in Rocket.Chat

Which template?

You need to be a lot more specific and descriptive.

@reetp
Copy link

reetp commented Mar 4, 2025

I set up the local server of rocket.chat successfully, please assign this issue to me and I will fix this bug

Please, read.

No one assigns issues.

Read ALL this, but start here:

Github

@NawazTalha
Copy link
Author

@reetp Fixed a syntax error in hello.ejs.t located in template/generator/new. The issue was causing incorrect template rendering. I have raised a pull request can you help me with the title?

@NawazTalha NawazTalha changed the title fix:fix a bug UI/UX bug: invalid JavaScript syntax issue Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants