-
Notifications
You must be signed in to change notification settings - Fork 452
[RequireJS issue] - TypeError: punycode.toASCII is not a function
#97
Comments
Let me look into this today. |
I updated to the newest version of the AWS SDK. Can you check? |
Seeing the same issue. Any ideas? Thanks |
Same error with the SDK in my big projet. Works fine on a project with (almost) just the SDK included in the html page. Seems something in my code is interfering with punycode, making it undefined. I didn't find what yet. EDIT: Seem to be a race condition? var punycode = require('punycode'); Seems to be evaluated before
This seems quite recent as an older SDK don't have this problem. |
Guys, It turned out that the I've managed to fix the bug by patching the module.exports = punycode;
// if (
// typeof define == 'function' &&
// typeof define.amd == 'object' &&
// define.amd
// ) {
// define('punycode', function() {
// return punycode;
// });
// } else if (freeExports && freeModule) {
// if (module.exports == freeExports) {
// freeModule.exports = punycode;
// } else {
// for (key in punycode) {
// punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
// }
// }
// } else {
// root.punycode = punycode;
// } |
Thanks @AlexanderC! Does this solve it for everyone? |
Yes, that fix works for me |
After updating to latest aws-cognito-sdk.js version, which seems to "rely" on AWS SDK
v2.3.14
, I'm running into below error:It seems to be an AWS SDK issue (ref. aws/aws-sdk-js#999) that is fixed in
v2.3.16
.Is there a way to rebuild aws-cognito-sdk.js with AWS SDK
v2.3.16
or greater ?The text was updated successfully, but these errors were encountered: