Javascript-форум (https://javascript.ru/forum/)
-   Node.JS (https://javascript.ru/forum/node-js-io-js/)
-   -   Не запускает скрипт на ubuntu 14.04 (https://javascript.ru/forum/node-js-io-js/72240-ne-zapuskaet-skript-na-ubuntu-14-04-a.html)

daetojekaRa 17.01.2018 18:29

Не запускает скрипт на ubuntu 14.04
 
Решил написать бота который будет подключаться twitch каналу. Подключил tmi модуль. Создал в директорий /home/kara/. Файл с название app.js.

Содержимое файла

var tmi = require ('tmi.js');

var options = {
    options: {
      debug: true
    },
    connection: {
      cluster: "aws",
      reconnect: true
    },
    identity: {
        username: "glorytvstudio",
        password: "(пароль)"
    },
    channels: ["daetojekaRa"]
};

var client = new tmi.client(options);
client.connect();


Запустил скрипт с помощу терминала.
Код:

nodejs app.js
выдает результат:

/home/kara/node_modules/tmi.js/lib/client.js:119
                    this.log.warn(`Could not parse message with no prefix:\n${
                                  ^
SyntaxError: Unexpected token ILLEGAL
    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> (/home/kara/node_modules/tmi.js/index.js:12:9)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)

Aetae 18.01.2018 00:10

Древняя небось нода, которая не знает о строках в ``.


Часовой пояс GMT +3, время: 02:19.