Skip to content

Error: Module did not self-register #1

@aminya

Description

@aminya

I am trying to load a .node file built with node_dlang, but I get this error.

Here is the issue:

> npm run build.node
 node -e "require('./dist/win32-x64/minijson.node')"
node:internal/modules/cjs/loader:1154
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: Module did not self-register: '\\?\C:\Users\aminy\Documents\GitHub\D\minijson\dist\win32-x64\minijson.node'.
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1154:18)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at [eval]:1:1
    at Script.runInThisContext (node:vm:129:12)
    at Object.runInThisContext (node:vm:305:38)
    at node:internal/process/execution:81:19
    at [eval]-wrapper:6:22 {
  code: 'ERR_DLOPEN_FAILED'
}

The code is here:
aminya/minijson#19

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions