MeemeeLab / node-anime-viewer

Nodejs implementation of ani-cli.
Other
27 stars 6 forks source link

Getting an issue with string-kit #1

Closed ghost closed 2 years ago

ghost commented 2 years ago

Getting this error when trying to run it. Is this a problem with this program? Or is this a problem with something else.

/home/fireboltaa/AniCli/node-anime/node_modules/string-kit/lib/format.js:327
                markupTarget = this.shiftedMarkup?.[ runtime.shift ]?.[ markup ] ;
                                                  ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/fireboltaa/AniCli/node-anime/node_modules/string-kit/lib/string.js:62:2)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
MeemeeLab commented 2 years ago

It's probably because of old nodejs version, try upgrading nodejs

ghost commented 2 years ago

That was the problem, thanks. I had installed node using apt on ubuntu, and apparently ubuntu cannot install the most recent node version, so I did

sudo npm i -g n
sudo n lts

sourced from https://muhammetkucuk.com/install-node-js-from-linux-tar-gz-file/