Giter Club home page Giter Club logo

Comments (16)

Igor-lkm avatar Igor-lkm commented on August 22, 2024 1

I have the same issue with node version 12.3.x

With version node v10.16.0 works good 🤔

from generator.

derberg avatar derberg commented on August 22, 2024 1

on it 👀

from generator.

derberg avatar derberg commented on August 22, 2024 1

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.

fmvilas avatar fmvilas commented on August 22, 2024

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.

fsimard-zz avatar fsimard-zz commented on August 22, 2024

Everything seem in order for compilation.

from generator.

fmvilas avatar fmvilas commented on August 22, 2024

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.

Igor-lkm avatar Igor-lkm commented on August 22, 2024

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.

fmvilas avatar fmvilas commented on August 22, 2024

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.

fmvilas avatar fmvilas commented on August 22, 2024

This may be related: node-ffi/node-ffi#552

from generator.

fmvilas avatar fmvilas commented on August 22, 2024

@derberg can you have a look at this bug? Seems that node-ffi is not compatible with Node.js v12.

from generator.

fmvilas avatar fmvilas commented on August 22, 2024

I think the problem appears on Node.js 12.

from generator.

derberg avatar derberg commented on August 22, 2024

yeap, with latest Node v12.4.0 installation fails

from generator.

derberg avatar derberg commented on August 22, 2024

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.

fmvilas avatar fmvilas commented on August 22, 2024

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.

derberg avatar derberg commented on August 22, 2024

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.

fmvilas avatar fmvilas commented on August 22, 2024

This shouldn't be a problem anymore since we got rid of the C++ parser. Closing.

from generator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.