launchdarkly / node-server-sdk

LaunchDarkly Server-side SDK for Node
Other
79 stars 65 forks source link

"yaml" dependency breaks compatibility with older node versions #144

Closed repl-sean-heintz closed 5 years ago

repl-sean-heintz commented 5 years ago

ldclient version: 5.7.2 node version: 5.12.0

Error encountered:

/opt/app/node_modules/yaml/dist/cst/ParseContext.js:83
  constructor(orig = {}, {
                   ^

SyntaxError: Unexpected token =
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:387:25)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/opt/app/node_modules/yaml/dist/cst/parse.js:10:44)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/opt/app/node_modules/yaml/dist/index.js:8:37)
    at Module._compile (module.js:413:34)

The package specifies that ldclient-node is compatible with:

  "engines": {
    "node": ">= 0.8.x"
  }

Can you please either fix the compatibility with older versions, or update the engine requirements?

Thanks!

eli-darkly commented 5 years ago

Sorry for the confusion - we do need to update the engines property, it is out of date. We currently don't support any Node version lower than 6.x, as the README.md states.

repl-sean-heintz commented 5 years ago

Thanks Eli, closing this.