generator
generator copied to clipboard
Wrong execution when trying to generate html template
Describe the bug
Running generator I got this error:
[action:generate-async][layer:use-case][app:ptp-load-test-app][version:0.0.0-test-200]
Error while trying to execute the use case.
Error: Error: command failed at ChildProcess.<anonymous> (/app/node_modules/@npmcli/promise-spawn/index.js:64:27) at ChildProcess.emit (events.js:315:20)
at ChildProcess.EventEmitter.emit (domain.js:467:12)
at maybeClose (internal/child_process.js:1048:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
--
How to Reproduce
npm version: 6.14.16 node version: 14.15.14 @asyncapi/generator: ^1.9.5,
code:
Expected behavior
I want to generate html template.
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.
@mathecruz Hi! As I see, error is not related to the generator. Please give us more info about error.
@magicmatatjahu Hi :)
It is related yes... see the log
I set debug flag to true.
@mathecruz Did you install @asyncapi/html-template
in your project, next to generator? If not, generator tries to install that package for you, but as I see, it has some problems with that (by logs I cannot see reason). You can install template by npm i @asyncapi/html-template
and then generator will use template from local node_modules :)
Let me know if it helped :)
@mathecruz I also recommend to npm i @asyncapi/html-template
if you use generator as library. It will also "fix" you to specific version, so it is safer.
I'll close it for now. But please feel free to leave a comment that you are not happy with the solution and I will reopen