How to add node as a dep to a package?

I’m trying to add nodejs as a dep to my fx project: https://github.com/antonmedv/fx/blob/master/snap/snapcraft.yaml

    stage-snaps:
      - node/18/stable

But getting this error:

/snap/fx/252/bin/node: /snap/fx/252/bin/../lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /snap/fx/252/bin/node)

How to do it? Thanks.

stage-snaps you want to include need to match the same base, else they will break… to find the base for a snap you do not have installed you can use:

snap info --verbose <snapname>|grep ^base: