Sometimes punycode is failing when it's bundled with bundlers (browserify, webpack), the result is that punnycode object is empty. It's causing:
Uncaught TypeError: punycode.toASCII is not a function in node-url.
My suggestion it to add a condition near line 295 in url.js:
if (typeof punycode.toASCII == 'function')
this.hostname = punycode.toASCII(this.hostname);
Sometimes punycode is failing when it's bundled with bundlers (browserify, webpack), the result is that punnycode object is empty. It's causing:
Uncaught TypeError: punycode.toASCII is not a function
in node-url.My suggestion it to add a condition near line 295 in url.js: