Async API Error in Event Portal + AsyncAPI Code Generation Codelab

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

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 ?

Hi @marc

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

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