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

Angular 8+ es2015 support (qrcode rewrite) #53

Closed
2 of 6 tasks
Cordobo opened this issue Jul 18, 2019 · 20 comments
Closed
2 of 6 tasks

Angular 8+ es2015 support (qrcode rewrite) #53

Cordobo opened this issue Jul 18, 2019 · 20 comments

Comments

@Cordobo
Copy link
Owner

Cordobo commented Jul 18, 2019

Hi there,

I open this issue to keep you updated about my ongoing efforts to provide es2015 support for Angular 8+.

Angular 8 changed the default target in tsconfig.json from es5 to es2015, which resulted in a build error when building with ng build (ng serve works as expected).

To follow the efforts, subscribe to this issue, I will update it from time to time.

Update 3: 29/12/2019 (29. Dec. 2019)

Version 2.0.0 is now available

Version 2.0.0 is now available for download and fixes the es5 issue in Angular 8+. A workaround is no longer needed.

TODOS:

  • DONE: Update Documentation to reflect the changes
  • DONE: Add a step-by-step guide to migrate from 1.x to 2.x
  • TBD: Test against angular 9
  • TBD: Test against Ivy compiler
  • TBD: Update Demo App
  • TBD: Install a working demo app

Update 2: 29/12/2019 (29. Dec. 2019)

I finished the transition to the new qrcode library and released a series of 2.0 alpha versions to npm. The code is still WIP, the API is not feature complete and there are a couple of breaking changes due to the underlying lib.

Update 1: 09/02/2019 (2. Sep. 2019)

I'm now working in my spare time for a while on a recursion error in the lib. I push my branch to github when this issue is fixed.

Workaround (no longer needed)

A temporary workaround is to set the target in your tsconfig.json from es2015 to es5:

"target": "es5"

@Cordobo Cordobo self-assigned this Jul 18, 2019
@Cordobo Cordobo added this to the 2.0.0 milestone Jul 18, 2019
This was referenced Jul 18, 2019
@lukengda
Copy link

Do you accept contributions for parts of the workload once you have a good plan for v2?

@Cordobo
Copy link
Owner Author

Cordobo commented Jul 22, 2019

@lukengda support is always welcome, I keep you (and any other interested) updated

@acp9191
Copy link

acp9191 commented Aug 7, 2019

Any update on this? Would really love to set my target back to es2015.

@PaLaMuNDeR
Copy link

PaLaMuNDeR commented Aug 13, 2019

Since we are on that topic:
"target": "es6"
also doesn't work

@bmesin
Copy link

bmesin commented Aug 26, 2019

@Cordobo
Are there any news here maybe?
Uncaught TypeError: Cannot read property '_android' of undefined #14889

This is still happening in Angular 8

@Cordobo
Copy link
Owner Author

Cordobo commented Sep 2, 2019

@bmesin The workaround still needs to be applied.

@garysb
Copy link

garysb commented Sep 21, 2019

Having the same issue:

Uncaught TypeError: Cannot read property '_android' of undefined

@Cordobo
Copy link
Owner Author

Cordobo commented Sep 25, 2019

@garysb Please use my workaround from above

@Zattor
Copy link

Zattor commented Oct 4, 2019

Hi, is it fixed? I tried to add it in a project where I cannot change the lib to es5 and as you mentioned, the workaround is probably needed to fix the "_android undefined" error.

@songokudbz
Copy link

songokudbz commented Oct 8, 2019

Waiting ... . Any planned release date for v 2.0.0?

@egodefroy
Copy link

egodefroy commented Oct 13, 2019

Not willing to add stress for you but going back to es5 brought me into trouble elsewhere. I like your solution and I'm waiting for a solution or production work-around in es2015... Cheers

@Cordobo
Copy link
Owner Author

Cordobo commented Oct 14, 2019

@egodefroy I came up with another workaround in the lib itself. I give it a try this weekend and I hope I can ship a new pre-2 version with es2015 support.

@songokudbz
Copy link

Does the latest beta version contain this fix?

@Slash7GNR
Copy link

Any news ? I would also like to use the package but I can't turn to ES5

@Cordobo
Copy link
Owner Author

Cordobo commented Oct 28, 2019

Does the latest beta version contain this fix?

No, the latest beta is more of a WIP and shouldn't be used (it'll break your build)

@jek-bao-choo
Copy link

@Cordobo thank you for maintaining this package. And for using https://github.com/soldair/node-qrcode in your rewrite. Appreciate your effort! Thank you!

@songokudbz
Copy link

@egodefroy I came up with another workaround in the lib itself. I give it a try this weekend and I hope I can ship a new pre-2 version with es2015 support.

It has been already more than 30 days. Can you give us a status update please?

@songokudbz
Copy link

All I want for Christmas is .... for this fix to be made available .... 🎄

@Cordobo
Copy link
Owner Author

Cordobo commented Dec 29, 2019

All I want for Christmas is .... for this fix to be made available .... 🎄

Sorry, I couldn't make that wish come true...

But, as of today, there is a working 2.0.0-alpha.1 published to npm (see my update above). Please do not expect too much, it does not break, it displays QR codes (as expected), but the API is not feature complete and there are no Docs available yet.

@Cordobo
Copy link
Owner Author

Cordobo commented Dec 29, 2019

Tada, Version 2.0.0 is out - thank my wife and my newborn son :)

@Cordobo Cordobo closed this as completed Dec 29, 2019
lse-gerrit pushed a commit to LinOTP/selfservice that referenced this issue Dec 17, 2020
Angular defaults to the newer compile target `es2015`. The dependency
angularx-qrcode is currently not supporting this compile target.
Therefore we revert to target `es5`. Development regarding this issue is tracked here:
Cordobo/angularx-qrcode#53

Once v2 is released we must switch back to es2015 builds to ensure
latest and greates optimizations can be used by angular.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests