I am new to JS and Node so I'm kind of confused with how importing modules work. I am trying to import js-big-decimal into my project hosted on Google App Engine, and so I originally tried this:
var bigDecimal = require('js-big-decimal')
Which gave me an error. I then tried this according to the requireJS documentation:
require(['require', 'js-big-decimal'], function (require) {
var bigDecimal = require('js-big-decimal');
});
And I am now getting the error
require.js:1961 GET xxxxxxx.uk.r.appspot.com/js-big-decimal.js net::ERR_ABORTED 404
and
require.js:168 Uncaught Error: Script error for "js-big-decimal"
https://requirejs.org/docs/errors.html#scripterror
at makeError (require.js:168)
at HTMLScriptElement.onScriptError (require.js:1738)
According to the docs this is due to a syntax error or something somewhere, but I'm not sure where exactly that could even be. What is the proper syntax for what I'm trying to do?