Comments (16)
I have the same issue with node version 12.3.x
With version node v10.16.0 works good 🤔
from generator.
on it 👀
from generator.
I have Mac 10.14.4 and I'm super old and use old Node :) version 8.16.0 and NPM 6.4.1
I installed generator with npm install -g asyncapi-generator
Then I took this spec:
asyncapi: '2.0.0-rc1'
id: 'urn:com:ec:stage:server'
info:
title: ec-all-events
version: v1
description: EC Events v1
channels:
customer.created.v1:
subscribe:
summary: Customer Register Event v2
message:
payload:
type: object
required:
- storeUid
- customerId
- customerUid
properties:
customerUid:
type: string
example: [email protected]
description: Email of a Customer
title: Customer uid
storeUid:
type: string
example: 4caad296
description: Unique id of a Store
title: StoreUid
customerId:
type: string
example: 0ed118f9474e
description: Unique id of a Customer
title: Customer uid
quote.orderplaced.v1:
subscribe:
summary: Order Placed for Quote Event v1
message:
payload:
type: object
required:
- quoteCode
- orderCode
properties:
quoteCode:
type: string
example: '76272727'
description: Code of Quote
title: Quote Code
orderCode:
type: string
example: '76272727'
description: Code of Order
title: Order Code
quote.expiresoonevent.v1:
subscribe:
summary: Quote Expiring Soon Event v1
message:
payload:
type: object
required:
- quoteCode
- quoteUserUid
- quoteUserType
- storeUid
- customerUid
properties:
customerUid:
type: string
example: [email protected]
description: Email Address of Customer
title: Customer ID
storeUid:
type: string
example: 4caad296
description: ID of the Store (BaseStore)
title: Store ID
quoteCode:
type: string
example: '76272727'
description: Code of Quote
title: Quote Code
quoteUserUid:
type: string
example: [email protected]
description: ID Of User Canceling Quote
title: ID Of User
quoteUserType:
type: string
example: BUYER
description: User Type
title: User Type
And I did ag asyncApiSpec.yaml markdown
and the result is:
Done! ✨
Check out your shiny new generated files at /Users/i303812/Desktop.`
I will try now with older Node versions and dig deeper
from generator.
Seems a problem with the compilation process. Can you make sure you have everything you need to build native modules? Check this out: https://github.com/nodejs/node-gyp#on-macos.
from generator.
Everything seem in order for compilation.
from generator.
It looks like a breaking change in latest Node.js native addons. Can someone help with this bug? I have little to no time lately to debug.
from generator.
Seems issue is with asyncapi-parser
package. If it is removed from package.json
then npm i
is ok for node version 12.3.x 🤔
from generator.
Yeah, as a hint, the asyncapi-parser
package is a C++ version of the Go one and it's imported in Node.js using ffi.
from generator.
This may be related: node-ffi/node-ffi#552
from generator.
@derberg can you have a look at this bug? Seems that node-ffi is not compatible with Node.js v12.
from generator.
I think the problem appears on Node.js 12.
from generator.
yeap, with latest Node v12.4.0 installation fails
from generator.
of course, installing asyncapi-parser
also fails. I checked node-ffi and there is another issue about lack of support for node 12.x node-ffi/node-ffi#545 and PR to fix it is already there node-ffi/node-ffi#544. Problem is that node-ffi
seems pretty abandoned to me as the main contributor TooTallNate
did not make any single comment under any issue in the project since last release in January. And even January release was already a headache node-ffi/node-ffi#465 (comment). I checked Node 11.15 and installation works.
Looking at the current status of the project, I'm not sure you can do anything else than just write in the readme of the generator that versions greater than 11 are not supported at the moment.
What do you think?
from generator.
I see. I think we're seeing many reasons to have a separate implementation of the JS (Browser and Node.js) parser. Let's discuss this later tomorrow on the public meeting. Thanks for investigating mate.
from generator.
Outcome of Tuesday meeting is that we should check how the WebAssembly will work for frontend and if all is nice, we could explore its usage in Node as a replacement of node-ffi -> asyncapi/asyncapi-react#47
from generator.
This shouldn't be a problem anymore since we got rid of the C++ parser. Closing.
from generator.
Related Issues (20)
- Allow $$operation$$ file template HOT 2
- `noOverwriteGlobs` will not work in majority of cases in templates using react HOT 10
- Proposal for mentorship of potential maintainers of generator -> `Becoming a Maintainer of AsyncAPI Generator` HOT 22
- [BUG] Demo from homepage does not work HOT 9
- Need to add proper options to generate the template from private registory using CLI HOT 2
- Allowing Generator to pull the templates from the private GitHub Repository HOT 1
- [Docs Bug 🐞 report]: The `template-constant` link is broken at the generator docs HOT 6
- [Docs Bug 🐞 report]: The `AsyncAPI document` button is broken at the generator docs HOT 3
- [📑 Docs]: Improve documentation related to `File templates` feature HOT 8
- `conditionalFiles` feature is broken when template uses `server` special parameter HOT 1
- Incoming changes for generator HOT 3
- Support platform generator type templates to infrastructure as code HOT 4
- [BUG] Docker container html template is not compatible with generator HOT 3
- Figure out what development flow will be without cli.js HOT 4
- Add Post-installation script for Cli.js deprecation and migration
- Migration Guide to md & post-installation script to deprecate `cli.js` HOT 4
- create our own changeset bot HOT 1
- Provide a development.md or **Development Guide** in readme where you explain how to start project locally and do some basic manual tests and how to run existing tests in isolated docker env HOT 1
- Put all (most) templates into the generator together for better developers' experience HOT 7
- Deprecate Nunjucks and Create Migration Guide to React HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generator.