openapi-codegen icon indicating copy to clipboard operation
openapi-codegen copied to clipboard

Tried to access yoga-layout-prebuilt dependencies

Open Patriksafar opened this issue 2 years ago • 1 comments

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 avatar Feb 23 '23 14:02 Patriksafar

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': '*'

Patriksafar avatar Mar 06 '23 12:03 Patriksafar