AMXD file can’t find Node script after freezing

Flex Council's icon

Max version: 8.1.11, Ableton version: 11.0.2, Mac OS version: 10.13.6

Hello Max community,

I’m trying to get all my dependencies into only an amxd file so I can distribute easily. I’m using one Node script file plus 2 vanilla Javascript files. My working directory is the project folder within the “Max For Live Devices” folder. As described in another forum post, I made a sub-folder for all my Node assets (called “node_stuff”) and included the Node source file (transformMIDI.js,) package-lock.json, and the node_modules folder. I then added search paths for every internal directory (except all the node_modules package folders,) clicked “embedded” for all of them, froze the device, then unfroze it as a solo file under a different name in a different directory. When the amxd file expands upon loading into a Live set, everything looks OK. All the files land in the “Max For Live Devices” folder under my new project name.

Going back into Max, the vanilla JS files resolve properly but the Node script is looking in the wrong directory for its source file. It wants to find it in “/Volumes/Username/Users/username/Library/Application Support/Cycling '74/Max 8/Settings/temp64-live/mxt/Clip_Evolver_coll_u984004780/node_stuff” The error message is: “Please ensure the path argument to [node.script] is correct and valid.” What is the path argument? I didn’t see it mentioned in the docs--https://docs.cycling74.com/max8/refpages/node.script

It is looking for a global version? I didn't see any options for switching between global and local on this file. The strange thing is that Node will find the correct source file in the "node_stuff" sub-folder of “Max For Live Devices” folder if I double-click the Node object within the editor, but when I start the script it looks in the folder named above. I am deselecting the “Keep Project Files Organized” box. Does anybody have any insight into why these references are breaking? Thanks!

transformMIDI.js
js 5.23 KB
Node source file

package-lock.json
json 43.90 KB
Package-lock file

readMIDI.js
js 2.01 KB
Vanilla JS file 1

writeMIDI.js
js 9.77 KB
Vanilla JS file 2

Clip Evolver.amxd
amxd 143.19 KB
Main patcher

Trevor being Trevor's icon

Under "Show Containing Project" in the bottom toolbar, I use the "+" button to add explicit dependencies if I am concerned about it being included. Some files that Max doesn't identify as a dependency, I make sure to add every time I look to freeze a device. It doesn't matter if it's in the search path if Max doesn't think it's necessary. Sorry you didn't get a timely response, I hope this helps others in the future.

Lee's icon

Hi, did you ever solve this? I'm having the same issues.

thx

Sonoran Music Devices's icon

@TREVOR BEING TREVOR wrote:

I hope this helps others in the future.

...and this just helped me out.

Thank you!