Forum Discussion

Stoplight's avatar
Community Manager
5 months ago

spectral-cli lint with custom resolver

I am trying to run spectral lint using a custom resolver that allows to resolve http with basic auth. So I am following the instructions on

But running spectral lint /data/spec/index.yaml --resolver resolver.js --ruleset spectral.yaml -v results in an error: Cannot find module '@stoplight/json-ref-resolver'

How could one make this work? Or is this a known bug?

Note: I am trying to make this work using docker stoplight/spectral:6.6.0.
Whole command I run locally is:

docker run --rm -v $(pwd):/data \ \
  lint /data/spec/index.yaml --resolver /data/spec/resolver.js --ruleset /data/spec/spectral.yaml -v

Thank you very much for your help 🙏 . 

No RepliesBe the first to reply