I am trying to edit some of the node.js standard http module files to use locally. HTTP requests work fine, however, when I go to use an HTTPS request, I get this error:
} = primordials;
^
ReferenceError: primordials is not defined
Is there a reason for this? I literally copied the Node.js http/https code directly, and the only dependency I have is http and https (to compare/test my version in the future). Note that this error is coming from /lib/internal/util.js, in the first declaration. I honestly can't figure this error out, as all people with this error seem to be using gulp (which I am pretty sure I am not using).
Edit:
I also looked at other modules, and apparently http also uses some primordial stuff too. I find this odd because I haven't got any errors from http, only util.js (when I use https). Not sure if this helps, but I found it interesting
Cheers