Open mxdvl opened 8 months ago
Tried this again today, the error is slighly different… we got further down the file:
$ deno run -A --unstable-sloppy-imports --unstable-bare-node-builtins dist/server.js
Warning Sloppy imports are not recommended and have a negative impact on performance.
error: Uncaught (in promise) ReferenceError: require is not defined
const external_node_async_hooks_namespaceObject = require("node:async_hooks");
^
at Module.89165 (file:///Users/max_duval/Code/tofu/dotcom-rendering/dist/server.js:17250:51)
at __webpack_require__ (file:///Users/max_duval/Code/tofu/dotcom-rendering/dist/server.js:52382:42)
at file:///Users/max_duval/Code/tofu/dotcom-rendering/dist/server.js:52546:37
at file:///Users/max_duval/Code/tofu/dotcom-rendering/dist/server.js:52549:12
This seems to be an issue with Node’s AsyncLocalStorage
, which we use for logging.
Running the
server.js
output from the Webpack build ofguardian/dotcom-rendering
with 48 kLoC.mxdvl/deno-challenge
branchcd dotcom-rendering
make build
deno run -A --unstable-sloppy-imports --unstable-bare-node-builtins dist/server.js
Failure with output: