node.js scripts runs in editor, but does not when packaged as standalone


    Jul 10 2021 | 1:03 pm
    I have a simple patch that uses node (mostly a wrapper around ws to allow websocket communications from the patch). It runs fine from inside the Max editor.
    When I bundle it all up as a standalone, it doesn't start the node script. In the console, I see the error:
    > node.script: Node script not running, can't handle message send
    I have a toggle monitoring the state of the node script object. It never turns on (I have it update every 60 seconds, issuing a `script start` message should it need to)
    I've enabled CEF support in the standalone export. Everything else runs fine, including some JSUI for other parts of the project. The code is definitely part of the project, and is error-free.
    Any suggestions as to why I'm enjoying this behaviour?

    • Jul 11 2021 | 2:09 pm
      Try to to copy Node for Max folder manually into standalone packages Unfortunately it includes bunch of not needed stuff, like binaries for both platforms, examples, man, docs etc But that can be removed to keep size a bit down, it is bad enough to have to use CEF Framework...
    • Jul 15 2021 | 12:17 pm
      Have you verified that all parts / necessary dependencies are packaged with your standalone?
      The Node For Max - Working with Projects, Devices and Standalones guide has detailed information on how to achieve that.
    • Jul 15 2021 | 3:03 pm
      Thanks for the suggestions, Florian and Source Audio - there's some useful suggestions there I'll look into when I have a moment to attack it again. There's some stuff I can see I immediately got wrong in your link, Florian :)