rom1504 on master
Fix breaking/placing blocks in … (compare)
rom1504 on master
Commands(OP): Make player non-c… (compare)
rom1504 on master
Fix item drop collection issue … (compare)
<Heptex> ```js
const express = require("express");
const { createServer } = require("http");
const { Server } = require("socket.io");
const app = express();
const httpServer = createServer(app);
const io = new Server(httpServer, {
cors:{
origin:"https://localhost:8000"
}
});
io.on("connection", (socket) => {
console.log("Hello")
});
httpServer.listen(3000);
app.get("/",(req,res)=>{
res.render("frontpage")
})
```
ERROR
(node:59243) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
If the issue is a feature request, what is the motivation / use case for it?
Tell us about your environment
http-server version: 0.11.1
Platform: Windows10
dependencies: ExpressJS, Nodemon, globally installed http, ejs, socket.io, socket.io-client
When I type in http-server //foldername
Accessing the HTTP server throws a DeprecationWarning for OutgoingMessage.prototype._headers on Node when I try to open the 8080 local port on my browser
Does anyone know why this might happen?
PLEASE PING ME AS I WILL BE CROSS-POSTING THIS
<Heptex> 📁 server.js
const express = require("express");
const { createServer } = require("http");
const { Server } = require("socket.io");
const app = express();
const httpServer = createServer(app);
const io = new Server(httpServer, {
cors:{
origin:"https://localhost:8000"
}
});
io.on("connection", (socket) => {
console.log("Hello")
});
httpServer.listen(3000);
app.get("/",(req,res)=>{
res.render("frontpage")
})
📁 client.js
import {io} from ("socket.io-client")
const socket = io("http://localhost:3000/")
let textinput = document.getElementById("TextInput")
let Posting = document.getElementById("buttonpost")
function PostMessage(){
let message = textinput.value
let messageinstance = document.createElement("h3")
messageinstance.innerHTML = message
}
Posting.addEventListener("click",(e)=>{
PostMessage()
socket.emit("MessagePosted",textinput.value)
})
📁 frontpage.html
<html>
<header>
<title>Welcome to my socket project</title>
</header>
<body>
<h1>Type a message!</h1>
<input type="text" id="TextInput">
<button id="buttonpost">Post</button>
<script src="../client/client.js" type="module"></script>
</body>
</html>
ERROR
(node:59243) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
If the issue is a feature request, what is the motivation / use case for it?
Tell us about your environment
http-server version: 0.11.1
Platform: Windows10
dependencies: ExpressJS, Nodemon, globally installed http, ejs, socket.io, socket.io-client
When I type in http-server //client
I receive this response in the terminal
```Starting up http-server, serving frontpage.html
http-server version: 14.1.1
http-server settings:
CORS: disabled
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none
http://192.168.56.1:8080
http://192.168.86.250:8080
http://127.0.0.1:8080
Hit CTRL-C to stop the server
Yet when I attempt to access http://localhost:8080 in my Brave browser URL, I receive this output in the VS Terminal
```(node:71276) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
ANY HELP IS APPRECIATED AND PLEASE PING ME AS I WILL BE CROSS-POSTING THIS
TypeError: Cannot read properties of undefined (reading 'biomes')
at prismarineChunkToNbt (D:\_\skyblock\instance\node_modules\prismarine-provider-anvil\src\1.14\chunk.js:25:38)
at Anvil.save (D:\_\skyblock\instance\node_modules\prismarine-provider-anvil\src\anvil.js:44:19)
at World.saveNow (D:\_\skyblock\instance\node_modules\prismarine-world\src\world.js:139:30)
at Timeout._onTimeout (D:\_\skyblock\instance\node_modules\prismarine-world\src\world.js:147:18)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
"
July 24th 2022, 01:45:06 [WARN]: -------------------------------
July 24th 2022, 01:45:06 [WARN]: Please report this flying-squid! This is bug (mabye)
July 24th 2022, 01:45:06 [WARN]: Unhandled rejection warning!
"
[STR] stderr "(node:16104) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 2
1)
"
July 24th 2022, 01:45:06 [WARN]: Error: TypeError: Cannot read properties of undefined (reading 'biomes')
July 24th 2022, 01:45:06 [WARN]: Report this error here: https://github.com/PrismarineJS/flying-squid/issues
July 24th 2022, 01:45:06 [WARN]: -------------------------------
<Heptex> 📁 package.JSON
{
"dependencies": {
"chartjs": "^0.3.24",
"dotenv": "^16.0.1",
"ejs": "^3.1.8",
"exceljs": "^4.3.0",
"expressjs": "^1.0.1",
"mongoose": "^6.4.7",
"nodemon": "^2.0.19",
"socket.io": "^4.5.1",
"socket.io-client": "^4.5.1"
},
"name": "serverside",
"version": "1.0.0",
"main": "./server.js",
"scripts": {
"test": "nodemon server.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": ""
}
📁 expressjs/package.JSON
{
"name": "expressjs",
"version": "1.0.1",
"description": "",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
ERROR
Error: Cannot find module 'C:\Users\lol\Desktop\MyMainProject\serverside\node_modules\expressjs\server.js'. Please verify that the package.json has a valid "main" entry
I am constantly getting this error, and then I attempt to change my main entry to reference server js, I just get this error instead
Error: Cannot find module 'C:\Users\lol\Desktop\MyMainProject\serverside\node_modules\expressjs\...\server.js'. Please verify that the package.json has a valid "main" entry
Any help would be greatly appreciated, I could not find any useful information online.
https://cdn.discordapp.com/attachments/413438265475989534/1001729415425822730/unknown.png
https://cdn.discordapp.com/attachments/413438265475989534/1001729415870427217/unknown.png