APIDevTools / swagger-cli

Swagger 2.0 and OpenAPI 3.0 command-line tool
https://apitools.dev/swagger-cli
MIT License
515 stars 69 forks source link

Latest version of the CLI I'm getting the following error #79

Open RicardoE105 opened 2 years ago

RicardoE105 commented 2 years ago

npm: '8.5.5', node: '16.15.0'

When trying to use swagger-cli bundle I get the error:

Cannot find module 'ajv/dist/core' Require stack:

gabbanaesteban commented 2 years ago

npm: 6.14.15 node: 14.18.2

I'm having the same issue when running swagger-cli validate file-name.yml

spock123 commented 1 year ago

Ditto here - anyone have a workaround?

spock123 commented 1 year ago

@gabbanaesteban @RicardoE105 It works with node14 (npm)

I guess it's because how npm now handles dependencies. super annoying

RicardoE105 commented 1 year ago

I had to fix the version in the package.json. It looks like the issue happens after 4.0.0.

"@apidevtools/swagger-cli": "4.0.0"

davidyell commented 1 year ago

Sadly, even fixing to version 4.0.0 I am still getting an error