-
-
Notifications
You must be signed in to change notification settings - Fork 239
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] Generation failing with Generator Error: Installation failed
#1256
Comments
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. |
Generator Error: Installation failed
It is working fine in my machine, can you share a screen recording of it @talglobus |
please run generation with |
Happens for me too, on multiple projects. Did not happen before, so I suspect this has to do with a new version of a template or something. Debug log is: AsyncAPI anonymously tracks command executions to improve the specification and tools, ensuring no sensitive data reaches our servers. It aids in comprehending how AsyncAPI tools are used and adopted, facilitating ongoing improvements to our specifications and tools.
To disable tracking, please run the following command:
asyncapi config analytics --disable
Once disabled, if you want to enable tracking back again then run:
asyncapi config analytics --enable
┌ AsyncAPI Generator
│
Template is not available locally and expected location is undefined. Known details are: undefined Error: Cannot find module '@asyncapi/html-template/package.json'
Require stack:
- /usr/local/lib/node_modules/noop.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/usr/local/lib/node_modules/@asyncapi/cli/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
at resolveFileName (/usr/local/lib/node_modules/@asyncapi/cli/node_modules/resolve-from/index.js:29:39)
at resolveFrom (/usr/local/lib/node_modules/@asyncapi/cli/node_modules/resolve-from/index.js:43:9)
at module.exports (/usr/local/lib/node_modules/@asyncapi/cli/node_modules/resolve-from/index.js:46:47)
at utils.getTemplateDetails (/usr/local/lib/node_modules/@asyncapi/cli/node_modules/@asyncapi/generator/lib/utils.js:196:30)
at Generator.installTemplate (/usr/local/lib/node_modules/@asyncapi/cli/node_modules/@asyncapi/generator/lib/generator.js:561:24)
at Generator.installAndSetupTemplate (/usr/local/lib/node_modules/@asyncapi/cli/node_modules/@asyncapi/generator/lib/generator.js:283:73)
at Generator.generate (/usr/local/lib/node_modules/@asyncapi/cli/node_modules/@asyncapi/generator/lib/generator.js:196:16)
at async Generator.generateFromString (/usr/local/lib/node_modules/@asyncapi/cli/node_modules/@asyncapi/generator/lib/generator.js:444:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/usr/local/lib/node_modules/noop.js' ]
}
Template installation started because the template cannot be found on disk.
Using npm registry https://registry.npmjs.org and authorization type anonymous to handle template installation.
◇ Generation failed
Generator Error: Installation failed |
It appears this bug was introduced in 2.3.12 of the html template. I don't have this problem with versions prior to that, going back to 2.3.8. So, pinning the version in the template is a solution, e.g. |
I should mention I'm using the docker image 'asyncapi/cli' at tag 'c03a2a76e1e4' to perform the generation via: # Has the problem using template 2.3.12
docker run --user=root \
--rm \
-v "$VOLUME_MAPPING" \
-v ${PWD}/output:"$OUTPUT_FOLDER_IN_CONTAINER" \
asyncapi/cli generate fromTemplate \
-o "$OUTPUT_FOLDER_IN_CONTAINER" \
"$DOC_IN_CONTAINER" \
@asyncapi/[email protected] \
--force-write \
-p sidebarOrganization=byTagsNoRoot |
sorry about that, fix has been deployed -> asyncapi/html-template#672 (comment) |
Describe the bug.
Whenever I try to generate anything, I get
Generator Error: Installation failed
Here's an example I tried from the website:
Expected behavior
Generations work correctly
Screenshots
How to Reproduce
asyncapi
withbun
$ asyncapi generate fromTemplate https://bit.ly/asyncapi @asyncapi/html-template -o example
^
+C
(Mac) to quit in the middle of the generate operationNote I've uninstalled and reinstalled the CLI multiple times since and found the error to be durable
🥦 Browser
Google Chrome
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
None
The text was updated successfully, but these errors were encountered: