agracio / edge-js

Run .NET and Node.js code in-process on Windows, macOS, and Linux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Apple M1/ARM?

jhulbertpmn opened this issue · comments

Has anyone had success using edge on an M1 Mac? I set it up without issue on an Azure Windows Server 2022 VM but using it locally on my Mac I get an error:

lib/edge.js:35
throw new Error('The edge native module is not available at ' + builtEdge
^

Error: The edge native module is not available at /Users/josh/Desktop/nodetest/node_modules/edge-js/build/Release/edge_coreclr.node. You can use EDGE_NATIVE environment variable to provide alternate location of edge.node. If you need to build edge.node, follow build instructions for your platform at https://github.com/agracio/edge-js

Which makes sense since it looks like the native builds are is32 and x64. Before I dig into trying to build it on my Mac I thought I would see if anyone had already solved this

I am on M1 pro, Mac OS 13.3.1, NET 6.0.301 SDK, NodeJS 18.17.1
Calling built DLL from NET 6.0 projec, on edgejs 19.3.0 is working well for me.

I'm seeing the same error with NodeJS 20.x, Mac OS Sonoma 14.2.1 , the .node files definitely aren't there like they are in windows, but not seeing an error on npm install or rebuild . Will post back once I find the solution for my situation.

edge-js-quick-start works for me on M1 Macbook, there are also other users that reported it working on M1. See if it works for you once you follow all the steps in README.