You cannot require or import modules from a URL.
ES6: import module from URL
What you can do is make an HTTP request to get the contents of the script and execute it, as in the answer, how to require the URL in Node.js
But that would be a bad decision, as your compilation of code would depend on an external HTTP call.
A good solution would be to upload the file to your code base and import it from there. You can transfer the git file if the file does not change much and is allowed to do so. Otherwise, the build step may load the file.
source share