Using the “require” feature to install NPM packages
If it’s your own code, just include it in the body of the function is one way of handling it. (If you’re using a package that’s on NPM, just do as @vini_brito suggests.)
That’s what I’ll probably end up doing.
It is my own code - I was trying to do it via Shared Assets because I have both a client-side element and an SSA that share several functions, so I thought it would be easier to update / manage that code from a single source.
Although, you could just use fetch in your SSA, if desired. (You might need to require node-fetch.)