stoplightio / spectral

A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v3.1, v3.0, and v2.0 as well as AsyncAPI v2.x.
https://stoplight.io/spectral
Apache License 2.0
2.36k stars 227 forks source link

spectral fails if NODE_OPTIONS=--max_old_space_size=4096 env defined #1903

Open evilrussian opened 2 years ago

evilrussian commented 2 years ago

For support questions, please use the Stoplight Discord Community. This repository's issues are reserved for feature requests and bug reports. If you are unsure if you are experiencing a bug, our Discord is a great place to start.

Please delete this section, any any sections below that you don't use, before creating the issue.

Describe the bug Then i define NODE_OPTIONS=--max_old_space_size=4096 the spectral fails without any error

/test # export NODE_OPTIONS=--max_old_space_size=4096
/test # spectral lint -F error ./specs/v1/schema/schema.yaml -v
/test # echo $?
4

To Reproduce

  1. export NODE_OPTIONS=--max_old_space_size=4096
  2. run spectral
  3. see fail

Expected behavior Not fails

Screenshots If applicable, add screenshots to help explain your problem.

Environment (remove any that are not applicable): docker image stoplight/spectral:6.1.0

Additional context Add any other context about the problem here.

P0lip commented 2 years ago

Is there any reason why you need to increase the default value?

evilrussian commented 2 years ago

Is there any reason why you need to increase the default value?

we uses this value as global default node options in our gitlab_ci. as workaround this env has been unset