asyncapi / generator

Use your AsyncAPI definition to generate literally anything. Markdown documentation, Node.js code, HTML documentation, anything!
https://asyncapi.com/docs/tools/generator
Apache License 2.0
768 stars 229 forks source link

generator fails to run #498

Closed thosaa closed 3 years ago

thosaa commented 3 years ago

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

github-actions[bot] commented 3 years ago

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.

Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

derberg commented 3 years ago

@thosaa interesting, latest release was bumped only because of the bump of the parser that had some minor fix in the JSON schema of the spec 🤔 and before that I was just fixing tests for windows https://github.com/asyncapi/generator/pull/496/files

derberg commented 3 years ago

oh damn, getting the same on mac 👀

thosaa commented 3 years ago

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

derberg commented 3 years ago

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

marcortw commented 3 years ago

Thanks @derberg for the quick fix! Just ran into the same issue

derberg commented 3 years ago

@marcortw sorry to hear

derberg commented 3 years ago

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

derberg commented 3 years ago

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

marcortw commented 3 years ago

That 🚀 was meant more like "wow, you're fast" and thanking you for your effort 👍

asyncapi-bot commented 3 years ago

:tada: This issue has been resolved in version 1.1.7 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

derberg commented 3 years ago

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

thosaa commented 3 years ago

@derberg All good again. 👍 Thanks

marcortw commented 3 years ago

Same here, it works. Thanks again!

bjoernmartin commented 3 years ago

Yep, all back to normal. Thanks!