Danielduel
Danielduel•9mo ago

Deno+vite crashes on node dependency

Earlier today I was happy because everything worked on my m1 macbook. When I've returned home (arch) I got errors from latest deno... (I am running deno on the metal, but I will provide a way to reproduce it with docker:)
FROM denoland/deno:1.38.3

WORKDIR /app

RUN deno run --allow-read --allow-write --allow-env npm:create-vite-extra@latest vite-project --template deno-react

WORKDIR /app/vite-project
RUN deno task build
FROM denoland/deno:1.38.3

WORKDIR /app

RUN deno run --allow-read --allow-write --allow-env npm:create-vite-extra@latest vite-project --template deno-react

WORKDIR /app/vite-project
RUN deno task build
error: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'getReport')
at isMusl (file:///app/vite-project/node_modules/.deno/rollup@4.6.0/node_modules/rollup/dist/native.js:5:30)
at getPackageBase (file:///app/vite-project/node_modules/.deno/rollup@4.6.0/node_modules/rollup/dist/native.js:53:28)
at Object.<anonymous> (file:///app/vite-project/node_modules/.deno/rollup@4.6.0/node_modules/rollup/dist/native.js:28:21)
at Object.<anonymous> (file:///app/vite-project/node_modules/.deno/rollup@4.6.0/node_modules/rollup/dist/native.js:81:4)
at Module._compile (node:module:733:34)
at Object.Module._extensions..js (node:module:747:10)
at Module.load (node:module:658:32)
at Function.Module._load (node:module:539:12)
at Module.require (node:module:677:19)
at require (node:module:791:16)
error: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'getReport')
at isMusl (file:///app/vite-project/node_modules/.deno/rollup@4.6.0/node_modules/rollup/dist/native.js:5:30)
at getPackageBase (file:///app/vite-project/node_modules/.deno/rollup@4.6.0/node_modules/rollup/dist/native.js:53:28)
at Object.<anonymous> (file:///app/vite-project/node_modules/.deno/rollup@4.6.0/node_modules/rollup/dist/native.js:28:21)
at Object.<anonymous> (file:///app/vite-project/node_modules/.deno/rollup@4.6.0/node_modules/rollup/dist/native.js:81:4)
at Module._compile (node:module:733:34)
at Object.Module._extensions..js (node:module:747:10)
at Module.load (node:module:658:32)
at Function.Module._load (node:module:539:12)
at Module.require (node:module:677:19)
at require (node:module:791:16)
9 Replies
Danielduel
Danielduel•9mo ago
Am I doing something in unintended way? (metal, interactive shell) import { join } from "node:path" join works like expected (rollup native.js uses const { platform, arch, report } = require('node:process'); so in interactive shell I did import { report } from "node:report" report is undefined
marvinh.
marvinh.•9mo ago
@Danielduel Can you file an issue for that? That sounds like a bug in Deno https://github.com/denoland/deno/issues/new
marvinh.
marvinh.•9mo ago
Went ahead and pasted the messages into an issue. https://github.com/denoland/deno/issues/21355
GitHub
node: process.report is missing · Issue #21355 · denoland/deno
Reported on discord: Earlier today I was happy because everything worked on my m1 macbook. When I've returned home (arch) I got errors from latest deno... (I am running deno on the metal, but I...
Danielduel
Danielduel•9mo ago
Thank you @marvinh., do I have to do anything now?
marvinh.
marvinh.•9mo ago
no, someone of the cli team will take a look at that issue. There is enough information in there to debug it
Danielduel
Danielduel•9mo ago
Thank you ^^ @bartlomieju thanks for the quick response, I suggest doing it in 2 parts - first just to make vite run with most of stuff stubbed in the polyfill and 2nd part to make actual implementation of the report object
bartlomieju
bartlomieju•9mo ago
Yup, that's a good approach!
Danielduel
Danielduel•9mo ago
I miss a detail here - despite I've built deno with an implementation of report in process... importing "node:process" still fetches it from the remote
Danielduel
Danielduel•9mo ago
GitHub
fix(ext/node): add stubbed process.report by Danielduel · Pull Requ...
targets #21355, #21304 Issues with vite are caused by the missing node's process report object. I've stubbed most of it for starter and replaced trivial spots with stubs. I am not sure how ...
More Posts
Jetbrains IDEA imports incompatibleI have `deno.json` file with a custom import... on vscode with deno's extension not have a trouble, question.. web push notifications having trouble with modulesHi. I’m new to Deno. Overall I’ve been happy with is performance and how lightweight and secure it iCertain code prevents Deno from doing anythingAny time I try and use Deno with `npm:zeromq@6.0.0-beta.19`, running my code has absolutely no outpuCustom `401 Unauthorized` error page, similar to builtin `404 Not Found`?How can I create a custom error page that is rendered by middleware in Fresh? The middleware handlesUsing `deno_emit` from Rust: building import graphI'm trying to use `deno_emit` from Rust to bundle modules. I already evaluated these modules with `dNPM Packages Usage on deno_core ?Hello, I'm visiting from https://deno.com/blog/roll-your-own-javascript-runtime-pt2. Utilizing JSRun`deno.disablePaths` doesn't workHi in `.vscode\settings.json` I have this: ```json { "deno.disablePaths": ["**/kit", "./kit", ".What is the correct syntax to set the `compilerOptions.types` to use npm @types libraryFor example: As of now if I want my .ts files to have access to the `npm:express` packages `@types/Using "imports" in deno.json doesn't work in VS.code* deno 1.38.3 * vs.code 1.84.2 * denoland.vscode-deno 3.28.0 I got rid of my import map and moved tdeno repl start time in containerWhy does deno repl take a couple seconds to start in a container the second time around, and starts