tjanczuk / edge

Run .NET and Node.js code in-process on Windows, MacOS, and Linux
http://tjanczuk.github.io/edge
Other
5.42k stars 640 forks source link

`edge-js` is looking for "Microsoft.CSharp', version: '4.5.0'" despite having set `process.env.EDGE_USE_CORECLR = '1';` #697

Closed brianjenkins94 closed 4 years ago

brianjenkins94 commented 4 years ago

Sample to reproduce the issue:

$ npm install edge-js
$ node -e "process.env.EDGE_USE_CORECLR = '1'; require('edge-js').func('async (input) => { return input.ToString(); }')"
Error: assembly specified in the dependencies manifest was not found -- package: 'Microsoft.CSharp', version: '4.5.0', path: 'lib/netstandard1.3/Microsoft.CSharp.dll'
/Users/bjenks/Desktop/temp/node_modules/edge-js/lib/edge.js:182
    return edge.initializeClrFunc(options);
                ^

TypeError: edge.initializeClrFunc is not a function
    at Object.exports.func (/Users/bjenks/Desktop/temp/node_modules/edge-js/lib/edge.js:182:17)
    at [eval]:1:56
    at Script.runInThisContext (vm.js:116:20)
    at Object.runInThisContext (vm.js:306:38)
    at Object.<anonymous> ([eval]-wrapper:9:26)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at evalScript (internal/process/execution.js:80:25)
    at internal/main/eval_string.js:23:3

Versions:

$ defaults read loginwindow SystemVersionStampAsString
10.15.2
$ node -v
v12.12.0
$ npm -v
6.13.2
$ dotnet --version
3.0.100

Any ideas?

brianjenkins94 commented 4 years ago

Disregard. I meant to file this here: https://github.com/agracio/edge-js/issues/96