Node for Max in standalone

    Feb 09 2019 | 10:07 am
    Hi folks
    I am really excited about the Node for Max features in Max 8. But does anyone know if it is possible to build a standalone application using Node and an external node package? I got it working within Max following this great turorial: However, when I build an application (.app) and try to run it, the node debugger says that it cant start the process because it can’t find the specific package - in my case, the wavefile package ( I have tried to install the package manually into some of the directories within the .app folder where I found other Node packages, but with no luck.
    It would be really great if it was possible use Node (along with packages) also in standalones.
    Best, Jakob

    • May 07 2019 | 12:23 pm
      Hey Jakob,
      I just came across this thread now. Have you seen this post explaining how to do it:
    • May 07 2019 | 1:07 pm
      Hi Florian, No I hadn't seen that post, so thanks a lot :-) Best, Jakob
    • Sep 21 2019 | 11:39 pm
      Florian, thank you for this tutorial, I hadn’t seen it either and it's exactly what I was looking for! Cleared up some things. I was going to put my main patch right inside the root folder and make another directory /subpatches but realized I should probably set up like the tutorial instead. I thought it would be more like:
      Root folder 'SomeSoundApp' and all this on the first level, including the main patch ('playground' right now), plus a /subpatchers folder
      Root folder 'SomeSoundApp' and all this on the first level, including the main patch ('playground' right now), plus a /subpatchers folder
      My app is a standalone that serves a static web page and has some other JS files that are client-side/helpers. I was going to add a folder called 'js' on same level as patchers/ and node_content/, is that what you'd recommend?
    • Sep 24 2019 | 9:42 am
      As mentioned in the other post we recommend making a single folder in the root of your project for the Node content in order to keep a clean and sane way of organizing your project and maintaining the project's search path in a simpler way.
      One other thing I'd recommend by looking at your screenshot would be to introduce prefixed file names. Especially file names like index.js and server.js are somewhat generic and might lead to unexpected behaviour when there are naming conflicts in your search path.
      Does that help? Florian
    • Sep 28 2019 | 3:22 am
      Yeah. They're generic like that because I took the setup instructions very literally - I tried setting it up as a Node Express project before adding Max patches to the mix, and in the instructions I followed (off MDN), it seemed to really want 'entry point' to be called 'index' when building the package.json . Now I'm kind of finding out that I don't really need to build the project like that, and things can be a lot simpler for what I want to do.