Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing es5 version breaks IE11 #86

Open
sebastiankr opened this issue Jul 21, 2018 · 14 comments
Open

missing es5 version breaks IE11 #86

sebastiankr opened this issue Jul 21, 2018 · 14 comments

Comments

@sebastiankr
Copy link

Hallo Mathias,

while working on my Angular component library eang I realized that [email protected] gets included into my build and since an es5 version is missing, it is breaking IE11.

Not sure why it is needed in the bundle at all, but others seem to have similar issues: angular/angular#21202 (comment)

Would you consider a PR integrating Typescript to transpile to es5 and es6?

@KristiyanVachev
Copy link

Downgrading to [email protected] fixed the problem for me.

Seems to be an acceptable solution since the punycode repo itself states that:

The current version supports recent versions of Node.js only. It provides a CommonJS module and an ES6 module. For the old version that offers the same functionality ... see v1.4.1.

@fhaussener
Copy link

@KristiyanVachev I'm having the same problem right now. How did you manage to downgrade the version of punycode, since it's a nested dependency of uri-js?

@KristiyanVachev
Copy link

@KristiyanVachev I'm having the same problem right now. How did you manage to downgrade the version of punycode, since it's a nested dependency of uri-js?

I just did.
npm install [email protected]

@fhaussener
Copy link

@KristiyanVachev I'm having the same problem right now. How did you manage to downgrade the version of punycode, since it's a nested dependency of uri-js?

I just did.
npm install [email protected]

Did you install it on project root level or inside the uri-js folder?

@KristiyanVachev
Copy link

@KristiyanVachev I'm having the same problem right now. How did you manage to downgrade the version of punycode, since it's a nested dependency of uri-js?

I just did.
npm install [email protected]

Did you install it on project root level or inside the uri-js folder?

Project root, but my problem wasn't with the instance uri-js had. Uri-js still uses 2.1.0 for the project, but seems like it's not being used.

@fhaussener
Copy link

@KristiyanVachev I'm having the same problem right now. How did you manage to downgrade the version of punycode, since it's a nested dependency of uri-js?

I just did.
npm install [email protected]

Did you install it on project root level or inside the uri-js folder?

Project root, but my problem wasn't with the instance uri-js had. Uri-js still uses 2.1.0 for the project, but seems like it's not being used.

Interesting, do you know which part of your application used the wrong version of punycode? Do you have an idea, how I can find the part, which is using es6 code, since I am getting my Syntax Errors in random places.

@blained3
Copy link

blained3 commented Dec 4, 2018

Are there any plans on implementing this? it is now a huge cause for error on those who use angular build and support ie11.

@ryanbowden
Copy link

Also having the same issue and we need this fixed.

@davidgolden
Copy link

I was able to fix this by sticking this in my webpack babel-loader config:

exclude: function (modulePath) { return /node_modules/.test(modulePath) && !/punycode/.test(modulePath); };

@michael-letcher
Copy link

I'm having the same issue adding [email protected] as a depency did not fix my issue though. It still fails.

const ucs2encode = array => String.fromCodePoint(...array);

@DanHitt
Copy link

DanHitt commented Mar 20, 2019

Same issue.

@bndby
Copy link

bndby commented Mar 28, 2019

I'm having the same issue adding [email protected] as a depency did not fix my issue though. It still fails.

const ucs2encode = array => String.fromCodePoint(...array);

same issue

@Markosyan-AR
Copy link

Lots of packages are dependent from this one. Millions of downloads. And es2015 syntax breaks ie apps. And still not fixed...

const ucs2encode = function(array) { return String.fromCodePoint.apply(array); }

Guys, can it be fixed that way?

RobM-ADP added a commit to RobM-ADP/punycode.js that referenced this issue Nov 20, 2019
@hgrubst
Copy link

hgrubst commented Mar 30, 2020

If using yarn you can add the following at the bottom of your package.json to force a resolution of version 1.4.1 :
"resolutions": { "punycode" : "1.4.1" }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests