Solace Community is getting a facelift!

On March 3rd we will be starting the process of migrating Solace Community to a new platform. As a result, Solace Community will go in to a temporary read-only state. You will still be able to come onto Solace Community and search through posts to find answers, but you won't be able to ask questions, post comments, or react in any way.

We hope to have the migration complete by Wednesday March 5th (or sooner), so please keep an eye out!

Async API Error in Event Portal + AsyncAPI Code Generation Codelab

bensabat
bensabat Member Posts: 6
edited May 2021 in PubSub+ Event Portal #1

When I run the command "ag -o RideDropoffProcessor -p binder=solace -p reactive=true -p artifactId=RideDropoffProcessor -p groupId=org.taxi.nyc -p javaPackage=org.taxi.nyc -p host=taxi.messaging.solace.cloud:55555 -p username=public-taxi-user -p password=iliketaxis -p msgVpn=nyc-modern-taxi ~/Downloads/RideDropoffProcessor.yaml @asyncapi/java-spring-cloud-stream-template" as described in the codelab but am running into this error:

Error: Cannot find module 'chokidar'
Require stack:

  • C:\Users\bensabat.j\AppData\Roaming\npm\node_modules\@asyncapi\generator\lib\watcher.js
  • C:\Users\bensabat.j\AppData\Roaming\npm\node_modules\@asyncapi\generator\cli.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
    at Function.Module._load (internal/modules/cjs/loader.js:730:27)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object. (C:\Users\bensabat.j\AppData\Roaming\npm\node_modules\@asyncapi\generator\lib\watcher.js:2:18)
    at Module._compile (internal/modules/cjs/loader.js:1068:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Module.require (internal/modules/cjs/loader.js:957:19) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'C:\Users\bensabat.j\AppData\Roaming\npm\node_modules\@asyncapi\;generator\lib\watcher.js',
    'C:\Users\bensabat.j\AppData\Roaming\npm\node_modules\@asyncapi\;generator\cli.js'
    ]
    }

. I currently have node v14.17.0 and npm 6.14.13. Please let me know if you have any recommendations!

Thanks, Joseph Bensabat

Tagged:

Comments

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 973 admin

    Hi @bensabat,
    What version of the AsyncAPI generator do you have? You can check using ag -V ?
    My guess is you have 0.53.1? I'm not a node guy, but for some reason that no longer seems to bring the proper dependencies with it so I think you have two options:
    1. I believe if you install the latest asyncapi generator version using npm install -g @asyncapi/generator the latest version will now work with the AsyncAPI file exported from the EVent Portal
    2. You can install the missing chokidar library: npm install -g chokidar

    If you go route #1 and it works please let me know 🙏

  • bensabat
    bensabat Member Posts: 6

    Hi @marc

    Going with route 1 I was able to bypass that error! Thank you for the help

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 973 admin

    @bensabat, excellent! Glad the latest version works :)
    I'll have to update the codelab to use that now

This Month's Leaders

This Week's Leaders