generator: generator fails to run

Describe the bug

Our pipeline ran asynapi-generator fine on th 3rd feburary and now it does not. I’ve checked it out locally and I get the same result.

Am I during something obviusly wrong?

Calling ag results in:

.\node_modules\.bin\ag -V
internal/modules/cjs/loader.js:329
      throw err;
      ^

Error: Cannot find module 'C:\...\node_modules\@asyncapi\generator-react-sdk\lib\index.js'. Please verify that the package.json has a valid "main" entry
    at tryPackage (internal/modules/cjs/loader.js:321:19)
    at Function.Module._findPath (internal/modules/cjs/loader.js:682:18)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:952:27)
    at Function.Module._load (internal/modules/cjs/loader.js:841:27)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (C:\...\node_modules\@asyncapi\generator\lib\renderer\react.js:2:23)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32) {
  code: 'MODULE_NOT_FOUND',
  path: 'C:\\...\\node_modules\\@asyncapi\\generator-react-sdk\\package.json',
  requestPath: '@asyncapi/generator-react-sdk'
}

How to Reproduce

Installing latest version and run ag or asyncapi-generator

It does not need to be the latest version as it seems to be a dependency which fails.

rm node_modeles cat package.json:

{
  "name": "AsyncAPI-generator",
  "version": "0.0.0",
  "devDependencies": {
    "@asyncapi/generator": "1.1.6"
  }
}

npm install .\node_modules.bin\ag

Expected behavior

The generator to run or ag -V to return the version.

Regards Thomas

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (12 by maintainers)

Most upvoted comments

@thosaa @bjoernmartin PR with fix opened. Once CI is ok and I get approval I will merge and the rest will be done automatically

@derberg All good again. 👍 Thanks

@thosaa @bjoernmartin @marcortw lemme know if 1.1.7 is ok on my side all looks good

That 🚀 was meant more like “wow, you’re fast” and thanking you for your effort 👍

gimme some time to get it into the generator, our bot that was supposed to do it is already having 🍺 with other bots. Typical Friday

generator-react-sdk is already released with a fix, soon it will be updated in the generator by a bot

@derberg Thanks for checking it out so fast. I’m glad to hear that I’m not the only one to see this.