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

[BUG] generator 2 with html-template does not work #619

Closed
2 tasks done
laat opened this issue Apr 30, 2024 · 6 comments
Closed
2 tasks done

[BUG] generator 2 with html-template does not work #619

laat opened this issue Apr 30, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@laat
Copy link

laat commented Apr 30, 2024

Describe the bug.

npm i -D @asyncapi/generator @asyncapi/html-template
npx asyncapi-generator --force-write --output dist asyncapi.yaml @asyncapi/html-template

Gives the error

Something went wrong:
Error: This template is not compatible with the current version of the generator (2.0.0). This template is compatible with the following version range: >=1.15.0 <2.0.0.
    at isTemplateCompatible (/Users/n637831/git/astest/node_modules/@asyncapi/generator/lib/templateConfigValidator.js:57:11)
    at module.exports.validateTemplateConfig (/Users/n637831/git/astest/node_modules/@asyncapi/generator/lib/templateConfigValidator.js:30:3)
    at Generator.configureTemplateWorkflow (/Users/n637831/git/astest/node_modules/@asyncapi/generator/lib/generator.js:314:5)
    at async Generator.generate (/Users/n637831/git/astest/node_modules/@asyncapi/generator/lib/generator.js:202:5)
    at async Generator.generateFromFile (/Users/n637831/git/astest/node_modules/@asyncapi/generator/lib/generator.js:503:12)
    at async /Users/n637831/git/astest/node_modules/@asyncapi/generator/cli.js:157:9

Expected behavior

It should probably still work.

Screenshots

repro: https://github.com/laat/asyncapi-generator-repro

How to Reproduce

repro: https://github.com/laat/asyncapi-generator-repro

🥦 Browser

None

👀 Have you checked for similar open issues?

  • I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

None

@laat laat added the bug Something isn't working label Apr 30, 2024
@derberg derberg transferred this issue from asyncapi/generator Apr 30, 2024
@derberg
Copy link
Member

derberg commented Apr 30, 2024

PR is opened #615 but we need to wait for CLI.

Remember to never do npm i -D @asyncapi/generator @asyncapi/html-template

Best practice with dependencies is to always install fixed version and upgrade manually: https://www.asyncapi.com/docs/tools/generator/versioning

@laat
Copy link
Author

laat commented May 1, 2024

Best practice with dependencies is to always install fixed version and upgrade manually: https://www.asyncapi.com/docs/tools/generator/versioning

I'm using package-lock.json. Caught this issue in a dependabot PR on my repo.

@albertodiazdorado
Copy link

It would be super nice if we could have the template work with the new version of the generator 🙏

@dcorto
Copy link

dcorto commented Aug 7, 2024

Hello, any update on this?

Thanks in advance 👍

Copy link
Member

derberg commented Aug 20, 2024

fyi asyncapi/cli#1472

any help will be welcome

@derberg
Copy link
Member

derberg commented Oct 14, 2024

solved with #615

@derberg derberg closed this as completed Oct 14, 2024
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

4 participants