jwks-rsa library showing errors while starting node backend

I am following the documentation here.

These are my library version install through npm install.
“express”: “^4.14.0”,
“express-jwt”: “^5.3.0”,
“express-jwt-authz”: “^1.0.0”,

When I start my server I get error from jwks-rsa library in lru-memoizer folder. This is what I see in the terminal. What am I doing wrong? Please help.

/Users/viditsaxena/Documents/unwander/unwander-services/node_modules/jwks-rsa/node_modules/lru-memoizer/index.js:18
      _.extend(load, { del }, options);
                           ^
SyntaxError: Unexpected token }
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/viditsaxena/Documents/unwander/unwander-services/node_modules/jwks-rsa/lib/wrappers/cache.js:45:20)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/viditsaxena/Documents/unwander/unwander-services/node_modules/jwks-rsa/lib/wrappers/index.js:8:14)
    at Module._compile (module.js:460:26)

I could not reproduce the issue in question and the error is also a syntax error in a dependency library so I would guess that the reason for the error is very specific to your environment as otherwise we should have received more reports of this situation.

The syntax error seems to suggest that shorthand object literal extensions are not supported; hence the error. Please update the question with more information about the environment in which you’re running this, including operating system and exact Node.js version.

@jmangelo I was thinking the same thing, it being an error from external dependency and indeed its because my node version is outdated so I upgraded it and no more errors. Found it hard to find info on Express version compatibility with node versions. No where I could find what is the least version of node I need for Express 4.14. Had to do trial and error. But thanks for pointing me in the right direction.

@jmangelo I was thinking the same thing, it being an error from external dependency and indeed its because my node version is outdated so I upgraded it and no more errors. Found it hard to find info on Express version compatibility with node versions. No where I could find what is the least version of node I need for Express 4.14. Had to do trial and error. But thanks for pointing me in the right direction.