spectral-owasp-ruleset icon indicating copy to clipboard operation
spectral-owasp-ruleset copied to clipboard

No matching version found for @stoplight/[email protected]

Open StefanLecho opened this issue 2 years ago • 6 comments

I'm following the instructions on https://github.com/stoplightio/spectral-owasp-ruleset, but when running "npm install --save -D @stoplight/spectral-owasp-ruleset@^2.0", I'm getting this error: "No matching version found for @stoplight/[email protected]"

When running "npm install --save -D @stoplight/spectral-owasp-ruleset@^1.4.3", it works fine.

Has v2.0 not yet been released ?

StefanLecho avatar Feb 09 '24 15:02 StefanLecho

Sorry, semantic release is bugging out, I'm trying to figure out why and get a proper version out now.

philsturgeon avatar Mar 01 '24 11:03 philsturgeon

It's been released now, but I'm getting errors trying to use it.

spectral lint openapi.yaml --verbose
Found 84 rules (73 enabled)
Linting /Users/phil/src/bump/train-travel-api/openapi.yaml
Error running Spectral!
Error #1: scope.sandbox.value.match is not a function
          at match(/(_url|Url|-u…  …js/core/index.js:66  _rollupPluginBabelH…
          at eval                  …js/core/index.js:66  _rollupPluginBabelH…
          at _traverseBody         …time/traverse.js:13  cb(scope);
          at _traverse             …time/traverse.js:41  _traverseBody(key, …
          at _traverseBody         …time/traverse.js:17  _traverse(value, sc…

@mnaumanali94 can you see if one of the team has a clue whats going on there? I can't figure it out from this error message alone.

node --version
v18.15.0

philsturgeon avatar Mar 06 '24 13:03 philsturgeon

@StefanLecho can you upgrade, are you also getting this?

philsturgeon avatar Mar 06 '24 13:03 philsturgeon

I'm getting the scope.sandbox.value.match is not a function error too:

  • Windows 11 Pro 23H2
  • Node - 18.16.0
  • spectral-cli - 6.11.0
  • spectral-owasp-ruleset - 2.0

Downgrading from 2.0.0 to 1.4.3 fixes things.

davidkeaveny avatar Mar 07 '24 04:03 davidkeaveny

@StefanLecho can you upgrade, are you also getting this?

After upgrading, I'm able to run v2.0 without any issues.

StefanLecho avatar Apr 12 '24 08:04 StefanLecho

2.0.1 resolved this error. You can close the issue.

philsturgeon avatar Apr 16 '24 07:04 philsturgeon