Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spectral error "DeprecationWarning: The punycode module is deprecated." #84

Closed
dret opened this issue Jan 28, 2025 · 2 comments · Fixed by #85
Closed

Spectral error "DeprecationWarning: The punycode module is deprecated." #84

dret opened this issue Jan 28, 2025 · 2 comments · Fixed by #85
Assignees
Labels
dependencies Pull requests that update a dependency file spectral

Comments

@dret
Copy link

dret commented Jan 28, 2025

Running the ruleset with the current Spectral version creates an error. This is reported in stoplightio/spectral#2622 but it is not quite clear if and how this issue can be resolved so that the ruleset can be used.

$ spectral --version
6.14.2
$ node --version
v22.13.1
$ spectral lint petstore.json --ruleset adidas.yaml
(node:53136) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Error running Spectral!
Use --verbose flag to print the error stack.
Error #1: Function is not defined
Error #2: Function is not defined
@dret dret changed the title Spectral error "DeprecationWarning: The punycode module is deprecated." Spectral error "DeprecationWarning: The punycode module is deprecated." Jan 28, 2025
@cesareomacias cesareomacias self-assigned this Feb 3, 2025
@cesareomacias cesareomacias added dependencies Pull requests that update a dependency file spectral labels Feb 3, 2025
@cesareomacias
Copy link
Collaborator

Hi,

Thank you @dret for raise the issue.
We're investigating possible workarounds in order to lint any OAS contract from the default ruleset (.spectral.yaml), but also from any defined ruleset --ruleset.
We'll keep you posted with any update.

Regards,
César.

@cesareomacias
Copy link
Collaborator

Hi @dret

The errors are because some annotations deprecated in the ruleset and some misconfigurations. Please try to execute again with the updated ruleset:

Regard to the deprecation warning of punycode. It shouldn't affect; in fact, I don't face with my setup:

$ spectral --version
6.13.1
$ node --version
v22.14.0

Please, keep us posted if you're still having issues.

Best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file spectral
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants