Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal issue #49

Open
SpiderUnderUrBed opened this issue Feb 17, 2021 · 4 comments
Open

Internal issue #49

SpiderUnderUrBed opened this issue Feb 17, 2021 · 4 comments

Comments

@SpiderUnderUrBed
Copy link

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'
]
}

@u9g
Copy link
Member

u9g commented Feb 17, 2021

what is your code?

@SpiderUnderUrBed
Copy link
Author

SpiderUnderUrBed commented Feb 17, 2021

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.

@u9g
Copy link
Member

u9g commented Feb 17, 2021

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
Copy link
Member

u9g commented Feb 17, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants