I did the hello world and “chuck norris” tutorials on tutorials.ubuntu.com to familiarize myself with building and running snaps. I then wrote snapcraft.yaml files for two nodejs apps I have. One is much simpler than the other. It has only 1 dependency (like the chuck norris tutorial), and when I build it with snapcraft prime
it does build a binary in prime/bin.
The other nodejs I want to make a snap of is more complicated and has 5 npm dependencies, including noble and bluetooth-hci-socket (which has shown issues installing in the past). When I snapcraft prime
this application, it does not build a binary in prime/bin.
So I’m wondering, because I haven’t been able to find it in documentation: what is required for a nodejs snap to build a binary, and is it ok that I was not warned in the console output that a binary could not be created?
I would think the answer to the latter is “no”, because my more complicated nodejs snap does not run, where the simpler nodejs snap does. The error I receive with the more complicated one is “Module version mismatch. Expected 48, got 46.” Internet searches tell me this is likely related to an outdated dependency, but snap is supposed to manage the dependencies, so I’m at a loss.