asyncapi / template-for-generator-templates

This is a GitHub repository template for generator templates to make it much easier to start writing your own generator template.
Apache License 2.0
19 stars 10 forks source link

[BUG] This template is not compatible with the current version of the generator #346

Open emeraldhieu opened 2 months ago

emeraldhieu commented 2 months ago

Describe the bug.

I got this error when running the command at https://github.com/asyncapi/template-for-generator-templates?tab=readme-ov-file#how-to-use-this-template-without-modifications

[~]$ ag https://raw.githubusercontent.com/asyncapi/generator/v1.0.1/test/docs/dummy.yml https://github.com/asyncapi/template-for-generator-templates -o output
(node:6538) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Something went wrong:
Error: This template is not compatible with the current version of the generator (2.4.1). This template is compatible with the following version range: >=1.3.0 <2.0.0.
    at isTemplateCompatible (/opt/homebrew/lib/node_modules/@asyncapi/generator/lib/templateConfigValidator.js:57:11)
    at module.exports.validateTemplateConfig (/opt/homebrew/lib/node_modules/@asyncapi/generator/lib/templateConfigValidator.js:30:3)
    at Generator.configureTemplateWorkflow (/opt/homebrew/lib/node_modules/@asyncapi/generator/lib/generator.js:311:5)
    at async Generator.generate (/opt/homebrew/lib/node_modules/@asyncapi/generator/lib/generator.js:199:5)
    at async Generator.generateFromURL (/opt/homebrew/lib/node_modules/@asyncapi/generator/lib/generator.js:473:12)
    at async /opt/homebrew/lib/node_modules/@asyncapi/generator/cli.js:159:9

How can I fix it?

Expected behavior

It works.

Screenshots

There's no screenshot.

How to Reproduce

  1. I first did this
  2. I then did this
  3. And so on . . .

🥦 Browser

Google Chrome

👀 Have you checked for similar open issues?

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

No, someone else can work on it

github-actions[bot] commented 2 months ago

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

derberg commented 2 months ago

Thanks, you it be possible for you to open a PR and fix https://github.com/asyncapi/template-for-generator-templates/blob/master/package.json#L68 config ?