Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

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

Open
RicardoE105 opened this issue May 20, 2022 · 5 comments
Open

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

RicardoE105 opened this issue May 20, 2022 · 5 comments

Comments

@RicardoE105
Copy link

RicardoE105 commented May 20, 2022

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:

  • /data/node_modules/ajv-draft-04/dist/index.js
  • /data/node_modules/@apidevtools/swagger-parser/lib/validators/schema.js
  • /data/node_modules/@apidevtools/swagger-parser/lib/index.js
  • /data/node_modules/@apidevtools/swagger-cli/lib/bundle.js
  • /data/node_modules/@apidevtools/swagger-cli/lib/index.js
  • /data/node_modules/@apidevtools/swagger-cli/bin/swagger-cli.js
  • /data/node_modules/swagger-cli/swagger-cli.js
@gabbanaesteban
Copy link

npm: 6.14.15
node: 14.18.2

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

@spock123
Copy link

Ditto here - anyone have a workaround?

@spock123
Copy link

spock123 commented Sep 16, 2022

@gabbanaesteban @RicardoE105 It works with node14 (npm)

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

@RicardoE105
Copy link
Author

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
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants