mashlol / notify

Notify your devices from the terminal

Home Page:https://mashlol.github.io/notify/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SyntaxError: Unexpected token

weyou opened this issue · comments

When registering the key, an error occurs. The notify was installed from "npm install -g notify-cli"

$ notify -r g5Y2221
/usr/local/lib/node_modules/notify-cli/notify.js:9
  var keys = Utils.getRegFile().split(/\n+/).filter(key => key);
                                                         ^
SyntaxError: Unexpected token >
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/notify-cli/app.js:8:14)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)

This is because your Node.js version doesn't support the => notation. Try upgrading Node.js for now, for a better solution I'll update so we don't use ES6 stuff anywhere.

commented

I have the same on centos6.
The nodejs (from epel) is in 0.10.48-3 for el6 and 6.10.2-1 for el7.