D
Deno

help

Deno+vite crashes on node dependency

DDanielduel11/27/2023
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)
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
Mmarvinh.11/27/2023
@Danielduel Can you file an issue for that? That sounds like a bug in Deno https://github.com/denoland/deno/issues/new
Mmarvinh.11/27/2023
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...
DDanielduel11/27/2023
Thank you @marvinh., do I have to do anything now?
Mmarvinh.11/27/2023
no, someone of the cli team will take a look at that issue. There is enough information in there to debug it
DDanielduel11/28/2023
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
Bbartlomieju11/28/2023
Yup, that's a good approach!
DDanielduel11/28/2023
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
DDanielduel11/28/2023
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 ...

Looking for more? Join the community!

Recommended 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 How to detect when --watch flag has been passed to `deno run` programatically?I am writing a small cli script, and I have a few bits of code that do not play nicely with `deno ruHelp with npm peerDependenciesHi 👋 I am using an npm library that has `@sinclair/typebox` listed under `peerDependencies`. It giAWS Lambda configHow do i set permissions in deno for aws lambda. Like --allow-env etcMigrating from EventEmitter…Hi! I've got some legacy code that depends on `node:events` 's `EventEmitter` class, specifically itusing flexsearchso flexsearch has a index.d.ts thats broken and hasn't been touched in 2ish years and instead you shDoes Deno third party modules support to wrap NPM in importmapHere is my first module: https://deno.land/x/lume_fluent@1.0.0-alpha My importmap for the module isHelp using DenoMaileri'm trying to use it but i get Deno is not defined when i try to send the email, any tips? how wouldDebug all tests in VSCodeHi everyone. I was hoping to use the equivalent of "deno test" in such a way that I can set a breakMost complete Deno Rust runtime?I’m trying to embed the Deno runtime into my Rust program. I’m looking for the most “complete” Deno Language server crashing in VSC outside of deno projects