generator icon indicating copy to clipboard operation
generator copied to clipboard

Wrong execution when trying to generate html template

Open mathecruz opened this issue 2 years ago • 4 comments

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: image

Expected behavior

I want to generate html template.

mathecruz avatar Jun 30 '22 16:06 mathecruz

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.

github-actions[bot] avatar Jun 30 '22 16:06 github-actions[bot]

@mathecruz Hi! As I see, error is not related to the generator. Please give us more info about error.

magicmatatjahu avatar Jul 01 '22 11:07 magicmatatjahu

@magicmatatjahu Hi :) image It is related yes... see the log

I set debug flag to true.

mathecruz avatar Jul 16 '22 00:07 mathecruz

@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 :)

magicmatatjahu avatar Jul 18 '22 08:07 magicmatatjahu

@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

derberg avatar Oct 11 '22 12:10 derberg