node.js - MAX - on Mac M1

michelefiori's icon

Hi everyone, I encountered a problem when starting script on node.js on MAX on Mac M1 : modules are not loaded due to an architecture problem: this is the error message :"Error dlopen ... "have 'x86_64', need 'arm64e'". The module is wrtc.node, but when I open the same through node.js installed directly on the mac, everything works fine ..

Joshua Kit Clayton's icon

Hi Michele,

It sounds like the version of wrtc.node is x86_64 (searching online it sounds like there are ways for you to build for M1, but relatively cumbersome to accomplish). The version of node you have installed on your system, independent of Max, is in all likelihood also x86_64, if it is working fine in that instance.

Under Max 8.2.0, we bundle a universal binary version of Node 16.6.0. If you run Max as native M1 arm64, node.script will by default launch a child process using this version of node as M1 native ARM code.

If you run Max using Rosetta, the child process will be launched using x86_64 architecture, and your x86_64 node modules should work. This may be enough for your purposes.

If you need to run Max as native M1 arm64, but want to use an x86_64 node process, you will need to specify an external x86_64 only node binary, via the @node_bin_path and @npm_bin_path attributes as described in the Node for Max documentation.

I hope this helps!

michelefiori's icon

thanks Joshua for the clarification! But if I understand correctly Max's new release also works natively on M1 .. this is great .. I have not found any announcements on this ..

Joshua Kit Clayton's icon


Yes, it is Apple Silicon native! Thanks for letting us know that it wasn't immediately clear.

We've got that info on the home page, forum announcement thread, and social media, but I notice that it's absent from the actual release notes page and the download page doesn't have any special mention of it.