Open lucacasonato opened 2 months ago
OS: Microsoft Windows 11 Pro OS Version: 10.0.22631 Nicht zutreffend Build 22631 To replicate this error follow those steps:
Command: deno -A .\index.js
index.js
import { createRequire } from "node:module";
const require = createRequire(import.meta.url);
require('dotenv').config();
require('module-alias/register');
const os = require('node:os');
const packageJSON = require('@root/package.json');
const HyperExpress = require('hyper-express');
process.package = packageJSON;
const port = process.env.BALANCER_PORT || 80;
const app = new HyperExpress.Server({
fast_buffers: process.env.HE_FAST_BUFFER == 'false' ? false : true || false,
});
app.get('/', (req, res) => {
res.header('Content-Type', 'text/html');
res.send(`<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>Index</title><link rel="icon" href="data:image/x-icon;,"></head><body><h1>Deno Test Branch</h1><hr><i>Test/${process.package.version}@${os.hostname}</i></body></html>`)
})
app.set_error_handler((req, res, error) => {
console.error(error);
});
app.listen(port)
.then((socket) => process.log.system(`Listening on port: ${port}`))
.catch((error) => process.log.error(`Failed to start webserver on: ${port}\nError: ${error}`));
package.json
{
"name": "deno-test",
"version": "0.0.1",
"description": "",
"main": "index.js",
"scripts": {
"start": "node index.js",
"update": "npx npm-check-updates -u"
},
"author": "",
"license": "MIT",
"_moduleAliases": {
"@root": ".",
"@src": "./src",
"@lib": "./lib",
"@api": "./api",
"@middleware": "./middleware",
"@config": "./config"
},
"dependencies": {
"dotenv": "^16.4.5",
"hyper-express": "^6.16.4",
"module-alias": "^2.2.3"
}
}
Its a code sniped of a larger nodejs project i tryed porting to deno following https://docs.deno.com/runtime/fundamentals/node/
The issue causing the LoadLibraryExW
error is that uWebSocket.js
uses v8 APIs directly (which we don't support as it's not ABI stable).
To work around this, you can use a package.json and install the dependencies via
npm install
.
Fixing that specific error (which is a subset of this issue) depends on #18478
So how do i get uWebsocket insalled on deno 2.0.0-rc.8 - If at all possible I do not have any deno experience, just want to try it because nodeJS runs into strange GC issues under high load for that project.
Running
deno install
provides this messageBut using npm install will install the build for nodeJs. Resulting in the crash:
Originally posted by @BolverBlitz in https://github.com/denoland/deno/issues/25648#issuecomment-2384894168