Cordobo / angularx-qrcode

A fast and easy-to-use Angular QR Code Generator library with Ivy support
https://cordobo.github.io/angularx-qrcode/
MIT License
467 stars 126 forks source link

Ionic 5, Angular 8 - issues with 2.1.3 #99

Closed hdk closed 4 years ago

hdk commented 4 years ago

In a small project with ionic 5, angular 8, cordova:

customer-routing.module.ts:49: loadChildren: () => import('./card/card.module').then(m => m.CardPageModule) card-routing.module.ts:17: export class CardPageRoutingModule {}

Any ideas? any help?

BR H

Cordobo commented 4 years ago

Hello @hdk ,

thanks for reporting this issue. Could you do two things:

1) try to install angularx-qrcode in version 2.1.3 again and run ionic serve, just to make sure npm didn't broke the package during installion:

npm cache clean
npm  install --save angularx-qrcode@2.1.3
ionic serve

2) As only one dependency was changed, please go to node_modules/angularx-qrcodeand find the line "qrcode": "1.4.4",. Now replace it with "qrcode": "1.4.2",, save the package.json and run

npm install --save qrcode@1.4.2
ionic serve

Please let me know if it worked for you or if you still get an error.

hdk commented 4 years ago

Hello!

after: npm cache clean npm install --save angularx-qrcode@2.1.3 ionic serve I still get this crash.

btw: in package.json the new line is "angularx-qrcode": "^2.1.3", which will lead to unwanted updates into 2.3.x .... shouldn't that be "~2.1.3" ?

and after: npm install --save qrcode@1.4.2 ionic serve .... it works!! no more crashes.

Cordobo commented 4 years ago

Hi @hdk

regarding your "btw" - yes it would lead to unwanted updates, but as this was only for debugging, it's fine (I guess).

My goal was to find out if qrcode in version 1.4.4 was our culprit. Apparently it is. I will downgrade the dependency and release new versions.

Thanks for your help!

hdk commented 4 years ago

Great!

I got this entry in package.json on very first install of version 2.1.3 as well! "angularx-qrcode": "^2.1.3"

had to manually change it and downgrade again after a npm update.

Cordobo commented 4 years ago

True, one should add the flags --save --save-exact if they want a pinned version (or use npm shrinkwrap, but that's a different story)

I released version 2.1.4, could you try it if it fixes the initial issue?

hdk commented 4 years ago

Hi!

It works! Installed 2.1.4 and can show QR-Codes again. Great!

btw, it's still strange: npm install angularx-qrcode@~2.1.4 --save adds "angularx-qrcode": "^2.1.4" to package.json npm install angularx-qrcode@~2.1.4 --save --save-exact adds "angularx-qrcode": "2.1.4"

but I'm no npm guru, so no idea if this is a issue of npm or of your module.

Cordobo commented 4 years ago

Good to hear.

Regarding the npm, I have a deeper look into it and update the npm strings accordingly.

Closing.