node-minecraft-wrap icon indicating copy to clipboard operation
node-minecraft-wrap copied to clipboard

Internal issue

Open SpiderUnderUrBed opened this issue 4 years ago • 4 comments

I keep on getting this error: events.js:291 throw er; // Unhandled 'error' event ^ Error: spawn java ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19) at onErrorNT (internal/child_process.js:464:16) at processTicksAndRejections (internal/process/task_queues.js:80:21) Emitted 'error' event on ChildProcess instance at: at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12) at onErrorNT (internal/child_process.js:464:16) at processTicksAndRejections (internal/process/task_queues.js:80:21) { errno: -2, code: 'ENOENT', syscall: 'spawn java', path: 'java', spawnargs: [ '-jar', '-Xms1024M', '-Xmx1024M', './minecraft/Server.jar', 'nogui' ] }

SpiderUnderUrBed avatar Feb 17 '21 04:02 SpiderUnderUrBed

what is your code?

u9g avatar Feb 17 '21 04:02 u9g

Code: function done(){ console.log('done') } const wrap = require("minecraft-wrap") const Server = new wrap.WrapServer("./minecraft/server.js","./minecraft", {}) Server.on('line', function (line) { console.log(line) }) Server.startServer({ motd: 'more coming soon!', 'max-players': 50 }, function (err) { if (err) { console.log(err) return } console.log('Server Started !')}, done) Also I strongly reccommend you guys get a discord server or any other form of live chat.

SpiderUnderUrBed avatar Feb 17 '21 04:02 SpiderUnderUrBed

Code: function done(){ console.log('done') } const wrap = require("minecraft-wrap") const Server = new wrap.WrapServer("./minecraft/server.js","./minecraft", {}) Server.on('line', function (line) { console.log(line) }) Server.startServer({ motd: 'more coming soon!', 'max-players': 50 }, function (err) { if (err) { console.log(err) return } console.log('Server Started !')}, done) Also I strongly reccommend you guys get a discord server or any other form of live chat.

we have a discord server: https://discord.gg/XzJeudtY

u9g avatar Feb 17 '21 04:02 u9g

Code: function done(){ console.log('done') } const wrap = require("minecraft-wrap") const Server = new wrap.WrapServer("./minecraft/server.js","./minecraft", {}) Server.on('line', function (line) { console.log(line) }) Server.startServer({ motd: 'more coming soon!', 'max-players': 50 }, function (err) { if (err) { console.log(err) return } console.log('Server Started !')}, done) Also I strongly reccommend you guys get a discord server or any other form of live chat.

also, for the code: you're using the function wrong. take a look at the example: https://github.com/PrismarineJS/node-minecraft-wrap/blob/master/examples/exampleWrapServer.js

u9g avatar Feb 17 '21 04:02 u9g