I’m trying to use edge-js to run a .NET dll in a Typescript vscode LSP extension I’m working on. I have a local Typescript project that successfully runs the dll using Edge-js. But can’t seem to get Edge-js to run because of this error.
adding:
const method = edge.func(filename);
or
edge.func("");
causes this error
Uncaught Error Error: The specified procedure could not be found.
\?c:{path to project}node_modulesedge-jslibnativewin32x6418.19.1edge_nativeclr.node
at func (electron/js2c/node_init:2:2214)
at Module._extensions..node (internal/modules/cjs/loader:1356:18)
at func (electron/js2c/node_init:2:2214)
at Module.load (internal/modules/cjs/loader:1126:32)
at Module._load (internal/modules/cjs/loader:967:12)
at c._load (electron/js2c/node_init:2:13672)
at Module.require (internal/modules/cjs/loader:1150:19)
at require (internal/modules/cjs/helpers:119:18)
at <anonymous> (c:VisualfilesSrcV6.XVSCScriptEditornode_modulesedge-jslibedge.js:53:8)
at Module._compile (internal/modules/cjs/loader:1271:14)
at Module._extensions..js (internal/modules/cjs/loader:1326:10)
at Module.load (internal/modules/cjs/loader:1126:32)
at Module._load (internal/modules/cjs/loader:967:12)
at c._load (electron/js2c/node_init:2:13672)
at Module.require (internal/modules/cjs/loader:1150:19)
at require (internal/modules/cjs/helpers:119:18)
at <anonymous> (c:VisualfilesSrcV6.XVSCScriptEditorserversrcserver.ts:47:1)
at Module._compile (internal/modules/cjs/loader:1271:14)
at Module._extensions..js (internal/modules/cjs/loader:1326:10)
at Module.load (internal/modules/cjs/loader:1126:32)
at Module._load (internal/modules/cjs/loader:967:12)
at c._load (electron/js2c/node_init:2:13672)
at executeUserEntryPoint (internal/modules/run_main:101:12)
at <anonymous> (internal/main/run_main_module:23:47)
The node module is indeed where it should be.
Node version : v20.11.0
I have tried Edge-js v21.7.2 and v22.1.1
The closest thing I could find online is this:
Error: The specified module could not be found
but this error is module not found, mine is procedure not found, not sure if relevant.
John Petfield is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.