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] Very out of date package JSON, breaking documentation example. #1562

Open
2 tasks done
dk-coligo opened this issue Oct 29, 2024 · 6 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@dk-coligo
Copy link

Describe the bug.

The documentation example https://www.asyncapi.com/tools/generator is to run using:

docker run --rm -it --user=root -v ${PWD}/example:/app/example -v ${PWD}/output:/app/output \
asyncapi/cli generate fromTemplate https://bit.ly/asyncapi @asyncapi/html-template -o example

However, the versions in the asyncapi/cli:2.8.0 (and many others) are out of date: package.json.

{
  "name": "@asyncapi/cli",
  "description": "All in one CLI for all AsyncAPI tools",
  "version": "2.8.0",
  "author": "@asyncapi",
  "bin": {
    "asyncapi": "./bin/run_bin"
  },
  "bugs": "https://github.com/asyncapi/cli/issues",
  "dependencies": {
    "@asyncapi/avro-schema-parser": "^3.0.23",
    "@asyncapi/bundler": "^0.6.3",
    "@asyncapi/converter": "^1.6.2",
    "@asyncapi/diff": "^0.4.1",
    "@asyncapi/generator": "^1.17.25",

resulting in the following errors:

◑  Generation in progress. Keep calm and wait a bit..Template @asyncapi/html-template successfully installed in /usr/local/lib/node_modules/@asyncapi/cli/node_modules/@asyncapi/generator/node_modules/@asyncapi/html-template.
Version of used template is 3.0.0.
◇  Generation failed
Generator Error: This template is not compatible with the current version of the generator (1.17.25). This template is compatible with the following version range: >=2.0.0 <3.0.0.

Expected behavior

Working example from homepage

Screenshots

image

How to Reproduce

Run the example from the homepage: https://www.asyncapi.com/tools/generator

🥦 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 ?

No, someone else can work on it

@dk-coligo dk-coligo added the bug Something isn't working label Oct 29, 2024
@github-project-automation github-project-automation bot moved this to To Triage in CLI - Kanban Oct 29, 2024
Copy link
Contributor

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.

@dk-coligo
Copy link
Author

dk-coligo commented Oct 29, 2024

For example, current generator version is: 2.4.1 https://github.com/asyncapi/generator/releases

Container for the CLI:2.8.0 is running the following versions:

@asyncapi/cli/2.8.0 linux-x64 node-v20.18.0
  ├@asyncapi/avro-schema-parser/3.0.24
  ├@asyncapi/bundler/0.6.4
  ├@asyncapi/converter/1.6.2
  ├@asyncapi/diff/0.4.1
  ├@asyncapi/generator/1.17.25
  ├@asyncapi/modelina-cli/4.0.0-next.62
  ├@asyncapi/openapi-schema-parser/3.0.24
  ├@asyncapi/optimizer/1.0.4
  ├@asyncapi/parser/3.3.0
  ├@asyncapi/protobuf-schema-parser/3.2.14
  ├@asyncapi/raml-dt-schema-parser/4.0.24
  └@asyncapi/studio/0.20.2

Repository: https://github.com/asyncapi/cli

@bernarth
Copy link

bernarth commented Nov 1, 2024

The error Generator Error: This template is not compatible with the current version of the generator (1.17.25). This template is compatible with the following version range: >=2.0.0 <3.0.0. is happening to me as well. I think the latest version of the generator should be used instead ( current version here ) which is 2.5.0 today

@abiola-deimos
Copy link

Does anyone know what the workaround is?

@bernarth
Copy link

bernarth commented Nov 7, 2024

I am using html-template so, I am using an specific version of it. -> 2.3.14
With the example above it could be something like: docker run --rm -it --user=root -v ${PWD}/example:/app/example -v ${PWD}/output:/app/output \ asyncapi/cli generate fromTemplate https://bit.ly/asyncapi @asyncapi/[email protected] -o example

You can use a compatible version (if you are using html-template here )

@yenidunya
Copy link

The error Generator Error: This template is not compatible with the current version of the generator (1.17.25). This template is compatible with the following version range: >=2.0.0 <3.0.0. is happening to me as well. I think the latest version of the generator should be used instead ( current version here ) which is 2.5.0 today

tried changing it in package.json and then installing cli. installed version of the generator seems OK but then I received following error while using generate:

    return oclifHandler(err.message);
           ^

TypeError: oclifHandler is not a function

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
Status: To Triage
Development

No branches or pull requests

4 participants