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] generate fromTemplate fails since 1.13.0 #1425

Closed
2 tasks done
eshepelyuk opened this issue May 15, 2024 · 4 comments · Fixed by #1426
Closed
2 tasks done

[BUG] generate fromTemplate fails since 1.13.0 #1425

eshepelyuk opened this issue May 15, 2024 · 4 comments · Fixed by #1426
Labels
bug Something isn't working

Comments

@eshepelyuk
Copy link

Describe the bug.

I am using CLI generate fromTemplate subcommand like this

asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template --debug \
  -o build/docs -p singleFile=true -p version=1.1.1

And started to receive following error after upgrade to 1.13.0, also fails in 1.14.0.

(node:99804) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
┌  AsyncAPI Generator

/home/linuxbrew/.linuxbrew/Cellar/asyncapi/1.14.0/libexec/lib/node_modules/@asyncapi/cli/node_modules/node-fetch/lib/index.js:1327
                throw new TypeError('Only absolute URLs are supported');
        ^
TypeError: Only absolute URLs are supported
    at getNodeRequestOptions (/home/linuxbrew/.linuxbrew/Cellar/asyncapi/1.14.0/libexec/lib/node_modules/@asyncapi/cli/node_modules/node-fetch/lib/index.js:1327:9)
    at /home/linuxbrew/.linuxbrew/Cellar/asyncapi/1.14.0/libexec/lib/node_modules/@asyncapi/cli/node_modules/node-fetch/lib/index.js:1450:19
    at new Promise (<anonymous>)
    at fetch (/home/linuxbrew/.linuxbrew/Cellar/asyncapi/1.14.0/libexec/lib/node_modules/@asyncapi/cli/node_modules/node-fetch/lib/index.js:1447:9)
    at Template.<anonymous> (/home/linuxbrew/.linuxbrew/Cellar/asyncapi/1.14.0/libexec/lib/node_modules/@asyncapi/cli/lib/commands/generate/fromTemplate.js:194:61)
    at Generator.next (<anonymous>)
    at /home/linuxbrew/.linuxbrew/Cellar/asyncapi/1.14.0/libexec/lib/node_modules/@asyncapi/cli/node_modules/tslib/tslib.js:115:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/home/linuxbrew/.linuxbrew/Cellar/asyncapi/1.14.0/libexec/lib/node_modules/@asyncapi/cli/node_modules/tslib/tslib.js:111:16)
    at Template.registryValidation (/home/linuxbrew/.linuxbrew/Cellar/asyncapi/1.14.0/libexec/lib/node_modules/@asyncapi/cli/lib/commands/generate/fromTemplate.js:193:24)
    at Template.parseFlags (/home/linuxbrew/.linuxbrew/Cellar/asyncapi/1.14.0/libexec/lib/node_modules/@asyncapi/cli/lib/commands/generate/fromTemplate.js:180:42)
    at Template.<anonymous> (/home/linuxbrew/.linuxbrew/Cellar/asyncapi/1.14.0/libexec/lib/node_modules/@asyncapi/cli/lib/commands/generate/fromTemplate.js:88:38)
    at Generator.next (<anonymous>)
    at fulfilled (/home/linuxbrew/.linuxbrew/Cellar/asyncapi/1.14.0/libexec/lib/node_modules/@asyncapi/cli/node_modules/tslib/tslib.js:112:62)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
error: Recipe `docs` failed with exit code 1

Expected behavior

Docs generated successfully.

Screenshots

image

How to Reproduce

Use 1.13.0 / 1.14.0 with command

asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template --debug \
  -o build/docs -p singleFile=true -p version=1.1.1

🥦 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

@eshepelyuk eshepelyuk added the bug Something isn't working label May 15, 2024
@github-project-automation github-project-automation bot moved this to Backlog in CLI - Kanban May 15, 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.

@LoicBoursin
Copy link

I can confirm the exact same issue

@Amzani
Copy link
Collaborator

Amzani commented May 15, 2024

It might be related to #1399
cc @AayushSaini101

@AayushSaini101
Copy link
Contributor

/home/linuxbrew/.linuxbrew/Cellar/asyncapi/1.14.0/libexec/lib/node_modules/@asyncapi/cli/node_modules/node-fetch/lib/index.js:1327
                throw new TypeError('Only absolute URLs are supported');

Checking @Amzani

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
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants