TypeError: URI.match is not a function

I get multiple erroer on the PlayCanvas code when trying to work it in my local host. I have a vague understanding of what a URI is but it’s very confusing as what the engine is doing at this point.

  322 |   }
  323 |   return s;
  324 | }, URI:function(uri) {
> 325 |   var re = /^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/, result = uri.match(re);
  326 |   this.scheme = result[2];
  327 |   this.authority = result[4];
  328 |   this.path = result[5];
  20796 |   }
  20797 |   return xhr;
  20798 | }, _guessResponseType:function(url) {
> 20799 |   var uri = new pc.URI(url);
  20800 |   var ext = pc.path.getExtension(uri.path);
  20801 |   if (Http.binaryExtensions.indexOf(ext) >= 0) {
  20802 |     return Http.ResponseType.ARRAY_BUFFER;
  20676 |     callback = options;
  20677 |     options = {};
  20678 |   }
> 20679 |   return this.request("GET", url, options, callback);
  20680 | }, post:function(url, data, options, callback) {
  20681 |   if (typeof options === "function") {
  20682 |     callback = options;
  21586 | };
  21587 | Application.prototype = {configure:function(url, callback) {
  21588 |   var self = this;
> 21589 |   pc.http.get(url, function(err, response) {
  21590 |     if (err) {
  21591 |       callback(err);
  21592 |       return;

What are the errors you are getting?

×
TypeError: uri.match is not a function

that is the main error I am getting. Do you know anything about this? I don’t know if the engine relies on another js library, hence I am getting the error.

Here’s a possible solution I got, but I honestly have no idea what they are talking about. Researching more…

possible solution

Can you post a minimal project that showcases the error please?

I think the problem is that PlayCanvas’ engine will only identify URLs. If I have a wepack require(config.json), PlayCanvas does not know hot to interpret that. I just directed all my files into a CDN.