fabien0102 / openapi-codegen

A tool for generating code base on an OpenAPI schema.
492 stars 61 forks source link

Tried to access yoga-layout-prebuilt dependencies #145

Open Patriksafar opened 1 year ago

Patriksafar commented 1 year ago

Hi, when running openapi-codegen gen github as yarn2 script command I get following error:

.pnp.cjs:81722
  return Object.defineProperties(new Error(message), {
                                 ^
Error: @openapi-codegen/cli tried to access yoga-layout-prebuilt, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: yoga-layout-prebuilt (via "yoga-layout-prebuilt/package.json")

tech stack:

"react": "18.0.2",
"scripts": {
    "build:api": "openapi-codegen gen github"
 }

Do you know how to solve it?

Patriksafar commented 1 year ago

Ok it seems to be issue with dependencies which I fixed now by adding packageExtensions to yarnrc.yml:

yarnrc.yml

packageExtensions:
  '@openapi-codegen/cli':
    dependencies:
      'yoga-layout-prebuilt': '*'