online-go / gtp2ogs

GTP Wrapper to allow bots to interface with the Online-Go.com Server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

yargs parser supports a minimum Node.js version of 12

phdsmhong opened this issue · comments

Hello anoek, I have a quick question. I have been running a bot on OGS server. After the recent update of gtp2ogs, my code no longer works. Here is the code I used at my colab.

#Install gtp2ogs devel branch
!apt-get install curl 1>/dev/null
!curl -sL https://deb.nodesource.com/setup_13.x |  -E bash - 1>/dev/null
!apt-get install -y nodejs 1>/dev/null
!npm install -g gtp2ogs 1>/dev/null

!npm install optimistsocket.io-client

%cd /content
!mkdir testtt 1>/dev/null
%cd /content/testtt
!git clone -b devel https://github.com/online-go/gtp2ogs 1>/dev/null
%cd /content/testtt/gtp2ogs 
!git branch 1>/dev/null
!sudo cp -rf * /usr/lib/node_modules/gtp2ogs/ 1>/dev/null
%cd /usr/lib/node_modules/gtp2ogs/ 
!npm install 1>/dev/null 

!nodejs /usr/lib/node_modules/gtp2ogs/dist/gtp2ogs.js --username $ogsBotName --apikey $ogsBotApikey   -- /usr/bin/python3 '/content/gdrive/My Drive/XXX.py')

When I run above, I receive the following error message. Can you please advise?

/usr/lib/node_modules/gtp2ogs/node_modules/yargs-parser/build/index.cjs:1015
        throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: [https://github.com/yargs/yargs-parser#supported-nodejs-versions`](https://github.com/yargs/yargs-parser#supported-nodejs-versions%60));
        ^

Error: yargs parser supports a minimum Node.js version of 12. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions
    at Object.<anonymous> (/usr/lib/node_modules/gtp2ogs/node_modules/yargs-parser/build/index.cjs:1015:15)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/usr/lib/node_modules/gtp2ogs/node_modules/yargs/build/index.cjs:1:60575)
    at Module._compile (internal/modules/cjs/loader.js:778:30)

Hi @phdsmhong ,

Please upgrade your node.js version to a more recent version, if you're using older than v12 it's past "old" and moved into the "really old" category. The latest LTS version is 18, I would recommend that.

Here's the Node.js support schedule if you're curious: https://github.com/nodejs/release#release-schedule . As versions drop off the chart there we start seeing supporting libraries drop support for them too, which makes it difficult for us to support them as well.