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

swagger-cli v2.2.2 loses support for RHEL 5 #31

Closed
pancakeslp opened this issue Jun 13, 2019 · 1 comment
Closed

swagger-cli v2.2.2 loses support for RHEL 5 #31

pancakeslp opened this issue Jun 13, 2019 · 1 comment

Comments

@pancakeslp
Copy link

Probably more as an FYI than an issue that will get fixed (as RHEL 5 has been out production support since 2017 ish)

On all my RHEL/OEL/Centos 5 boxes when using v2.2.2 I get the below error

SwaggerParser.prototype.parse = async function (path, api, options, callback) {
                                      ^^^^^^^^

SyntaxError: Unexpected token function
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.validate (/root/code/swagger-api/myoffers/node_modules/swagger-cli/lib/validate.js:22:23)

If I downgrade to version 2.2.1 it works again for me on all RHEL/OEL/Centos 5 boxes I've tested.
Might also be worth noting that my Centos 7 boxes happily accept v2.2.2

Cheers

@JamesMessinger
Copy link
Member

I'm not familiar with RHEL 5, but I suspect that it's using an old version of Node. Only Node 8 and newer are supported anymore. Here's the LTS schedule:

https://nodejs.org/en/about/releases/

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

2 participants