jdx/npm-register

cant run simple system

donhenton opened this issue · 3 comments

Missing something obvious no doubt

  • npm install -g npm-register
  • npm-register

get this error:

npm-register start
Opbeat agent is inactive due to configuration
Saving files to local filesystem at /Users/dhenton/node-proj/identity-ws/tmp
/usr/local/lib/node_modules/npm-register/routes/tarballs.js:9
  let {scope, name, filename, sha} = this.params
      ^

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:16:19)
    at load (/usr/local/lib/node_modules/npm-register/routes/index.js:21:13)
    at Object.<anonymous> (/usr/local/lib/node_modules/npm-register/routes/index.js:27:1)
    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:16:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/npm-register/server.js:8:16)

Running on MAC Sierra

Any help appreciated

node version?

v5.6.0

In node 5 you could use a load of harmony flags to enable destructuring etc, but you'd be better off going with node v6 upwards (v6 recently went to LTS status)