Skip to content

Loading native Node module fails with "stream did not contain valid UTF-8" #17246

Description

@ealib

Deno

  • deno 1.29.1 (release, x86_64-pc-windows-msvc)
  • v8 10.9.194.5
  • typescript 4.9.4

Output

error: Unable to load C:\Users\UserName\AppData\Local\deno\npm\registry.npmjs.org\node-mdaemon-api\22.0.3-alpha.19\node-mdaemon-api.node imported from file:///C:/tmp/test-native.ts

Caused by:
    stream did not contain valid UTF-8

How to reproduce

Command

deno run --unstable --allow-all test-native.ts

Script test-native.ts is

import { getModuleInfo } from 'npm:node-mdaemon-api'; 

const moduleInfo = getModuleInfo();

console.dir(moduleInfo);

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs investigationrequires further investigation before determining if it is an issue or notnode compatnode native extensionrelated to the node-api (.node)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions