Skip to content

Having node: prefix panicked at JSR version 0.41.0 #391

Closed
@imcotton

Description

@imcotton

input

// main.ts

import { argv } from 'node:process';

console.log(argv.slice(2));
// build.ts

import { build, emptyDir } from "@deno/dnt";

await emptyDir("./npm");

await build({
  entryPoints: ["./main.ts"],
  outDir: "./npm",
  shims: {
    deno: "dev",
  },
  package: {
    name: "your-package",
    version: "0.1.0"
  },
});

error

panicked at wasm\src\lib.rs:24:1:
unexpected exception: JsValue(TypeError: Unsupported scheme "node:" for module "node:process". Supported schemes: ["data:","blob:","file:","http:","https:"].
TypeError: Unsupported scheme "node:" for module "node:process". Supported schemes: ["data:","blob:","file:","http:","https:"].
    at getValidatedScheme (https://jsr.io/@deno/cache-dir/0.8.0/file_fetcher.ts:59:11)
    at FileFetcher.fetch (https://jsr.io/@deno/cache-dir/0.8.0/file_fetcher.ts:288:20)
    at FetchCacher.load (https://jsr.io/@deno/cache-dir/0.8.0/cache.ts:24:30)
    at fetch_specifier (https://jsr.io/@deno/dnt/0.41.0/lib/pkg/snippets/dnt-wasm-a15ef721fa5290c5/helpers.js:6:22)
    at __wbg_fetchspecifier_a6bda29173284144 (https://jsr.io/@deno/dnt/0.41.0/lib/pkg/dnt_wasm.generated.js:336:21)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions