I downloaded the repository (with git clone https://github.com/Dinnerbone/mcstatus on the command line)
Then I included the few lines told in the main page of this repo in a js file meant to be a discord bot :
from /Users/*********/mcstatus import MinecraftServer;
And I get this error :
from /Users/*********/mcstatus import MinecraftServer;
^^^^^^
SyntaxError: Unexpected token import
at createScript (vm.js:74:10)
at Object.runInThisContext (vm.js:116:10)
at Module._compile (module.js:537:28)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
at Function.Module.runMain (module.js:609:10)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:598:3
I also have the node.js and discord.js files...
Can anyone explain me what this error means ? Being new to coding is quite hard...
I use MacOS Sierra
I downloaded the repository (with
git clone https://github.com/Dinnerbone/mcstatus
on the command line) Then I included the few lines told in the main page of this repo in a js file meant to be a discord bot :from /Users/*********/mcstatus import MinecraftServer;
And I get this error :I also have the node.js and discord.js files... Can anyone explain me what this error means ? Being new to coding is quite hard...