Comments (17)
Ok, what I've read so far, it could be an issue with an older @angular dependency (1) used in your package.json. I run ng build --prod with the following devDependencies and can't reproduce the error. Coiuld you try updating your dependencies to the ones below?
"devDependencies": {
"@angular-devkit/build-angular": "~0.803.21",
"@angular-devkit/build-ng-packagr": "~0.803.21",
"@angular/cli": "~8.3.21",
"@angular/compiler-cli": "~8.2.14",
"@angular/language-service": "~8.2.14",
...
}
- Reference: angular/angular-cli#15705
from angularx-qrcode.
@nicosoutn2014 I am using @angular/cli ^7.2.2 - I downgraded angularx-qrcode to ^1.6.4 which removed the issue for me. Be aware that the documentation is slightly different between versions.
from angularx-qrcode.
The fix proposed on this thread only works for Angular 8+. This component is supposed to be compatible with Angular 7. Please provide a fix for Angular 7.
from angularx-qrcode.
I called
- npm update (update to latest minor)
- npm install @angular-devkit/[email protected]
- ng build --prod (works now)
Thanks to all other suggestions. Very helpful :-)
from angularx-qrcode.
@andreElrico my issue was with a different library but it was throwing the same error, and the steps above got it working. Thanks!
from angularx-qrcode.
@egodefroy Thanks for your bug report, could you please provide a working repo with which I can reproduce the issue?
compare #67
from angularx-qrcode.
Hi, having the same issue with an ionic app, when running --prod.
from angularx-qrcode.
@Cordobo
see my repo : https://github.com/egodefroy/tstqr
from angularx-qrcode.
solved the issue by downgrading to 1.6.4
from angularx-qrcode.
@Cordobo
see my repo : https://github.com/egodefroy/tstqr
I can't access the repo, I got a 404
from angularx-qrcode.
@Cordobo
Thanks, this seems the right analysis. Using these dependencies, the error does not show!
from angularx-qrcode.
Ok, closing. Feel free to highlight my comment for other users with a smilie.
from angularx-qrcode.
@Cordobo Hi! What about @angular/cli ~7.3.5? Any fixes?
from angularx-qrcode.
Got the same error and fixed it by downgrading the version, as stated above.
Please, try making the latest version compatible with the newest versions of angular in order to not lose functionalities.
from angularx-qrcode.
The fix proposed on this thread only works for Angular 8+. This component is supposed to be compatible with Angular 7. Please provide a fix for Angular 7.
I agree. Version 2.x is declared to work with Angular 6/7/8/9 which is incorrect, because you have to use @angular-devkit/build-angular 0.8xx in order to build prod without errors. This again requires Angular 8. This finally leaves version 2.x unusable with Angular 6+7 in a prod environment.
from angularx-qrcode.
The fix proposed on this thread only works for Angular 8+. This component is supposed to be compatible with Angular 7. Please provide a fix for Angular 7.
I agree. Version 2.x is declared to work with Angular 6/7/8/9 which is incorrect, because you have to use @angular-devkit/build-angular 0.8xx in order to build prod without errors. This again requires Angular 8. This finally leaves version 2.x unusable with Angular 6+7 in a prod environment.
You are right. Just got my code working and found this thread after wondering why my production build is broken. Page still says that 2.x is compatible with Angular 7.x but this is incorrect. @Cordobo please give us working fix or correct the documentation.
from angularx-qrcode.
Hi @ALL
I updated the readme to reflect the issue.
from angularx-qrcode.
Related Issues (20)
- Support for angular 15 HOT 1
- Routing inside the same Ionic App HOT 1
- content security policies violation issue HOT 3
- Usage with Angular 15 not working (version: "angularx-qrcode": "^15.0.0") HOT 4
- Replace qrcode library to fix commonjs warning HOT 3
- angularx-qrcode > @cordobo/[email protected]: Package no longer supported HOT 1
- QR-Code not displayed in Google Chrome when center image is defined HOT 3
- qrCode not working in dialog window! HOT 4
- [email protected] (Angular v8) should have a callback for returning the url when is created HOT 1
- Accidentally pulling in @types/node HOT 7
- Support for Angular 16 HOT 5
- How many string can [qrdata] hold? HOT 1
- angular 16.1.8 declare var AbortSignal: error HOT 4
- When i scan the QR code the accents are replaced with chinese characters HOT 1
- Is it possible to get the Base64 image string for a QR code in a TS file? HOT 3
- qrcode types missing HOT 7
- When i initialize the QR code,Chrome console show : Uncaught (in promise) SyntaxError: Unexpected token '�', "�PNG
- Support for Angular 17 HOT 8
- Support qrCodeURL (EventEmitter) for 12.0.3 version HOT 1
- Ionic Capacitor NSURLResponse error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angularx-qrcode.