Comments (11)
Hi @bkimminich , I'm actively working on a version without this error, meanwhile a temporary workaround has to be applied, es2015 as target does not work yet for production builds, see here:
https://github.com/Cordobo/angularx-qrcode#install-160-with-angular-8
You could although checkout the sample repo from above, which doesn't throw the this._android
error with angular 8.
HTH
from angularx-qrcode.
Hi @frabanca,
Please use the workaround mentioned above until a refactored version is available:
Replace:
"target": "es2015"
with
"target": "es5"
Closing this, as I'm actively working on this.
from angularx-qrcode.
Hi @harkal18 , glad you like the lib. I'm working on the fix for Angular 8+.
Did you try this temporary workaround? Set the target in your tsconfig.json from es2015 to es5:
"target": "es5"
Source: angular/angular#30759 (comment)
from angularx-qrcode.
I created a sample repo for Angular 8 here: https://github.com/Cordobo/angularx-qrcode-sample-app
The only difference I see is "module": "es2015",
, whereas my tsconfig.json states "module": "esnext",
(although both worked in my test)
The following is just to be sure we both have the same setup:
- Checkout the sample-repo
- Run
npm install
(or remove all npm modules and reinstall) - Run
ng build
again - Run
npm run dev
to start up a local server for your production-build
from angularx-qrcode.
I am using ^1.6.0
which compiles with both es5
and es2015
without problems. But when loading the application with es2015
-compiled code I get this error:
from angularx-qrcode.
thats ok
but why does it work in localhost then ?
from angularx-qrcode.
it still doesn't work bro
i haven't changed anything in my project and just now i looked at my tsconfig.json
this is how it looks
{ "compileOnSave": false, "compilerOptions": { "baseUrl": "./", "outDir": "./dist/out-tsc", "sourceMap": true, "declaration": false, "module": "es2015", "moduleResolution": "node", "emitDecoratorMetadata": true, "experimentalDecorators": true, "importHelpers": true, "target": "es5", "typeRoots": [ "node_modules/@types" ], "lib": [ "es2018", "dom" ] } }
it looks adjactly how you want it
target set to es5
from angularx-qrcode.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from angularx-qrcode.
Same problem here.
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 8.0.3
Node: 10.12.0
OS: win32 x64
Angular: 8.0.1
... animations, cdk, common, compiler, compiler-cli, core, forms
... language-service, material, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.800.3
@angular-devkit/build-angular 0.800.3
@angular-devkit/build-optimizer 0.800.3
@angular-devkit/build-webpack 0.800.3
@angular-devkit/core 8.0.3
@angular-devkit/schematics 8.0.3
@angular/cli 8.0.3
@ngtools/webpack 8.0.3
@schematics/angular 8.0.3
@schematics/update 0.800.3
rxjs 6.4.0
typescript 3.4.5
webpack 4.30.0
Uncaught TypeError: Cannot read property '_android' of undefined
tsconfig.json
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "esnext",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
]
}
}
from angularx-qrcode.
Hi @Cordobo, I have been waiting for this path since long time now. Can you please help us with the fix. By the way Angular 9 is on the edges to get released so probably you should also patch for the angular 9.
from angularx-qrcode.
Unfortunately, there is no easy patch to apply, please follow issue #53
from angularx-qrcode.
Related Issues (20)
- 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 2
- Could not find a declaration file for module 'qrcode' HOT 9
- types.ts RGBAColor issue HOT 1
- Warning on Compilation: Dependency on CommonJS 'qrcode' Module Causes Optimization Bailouts HOT 2
- qrcode module is not ESM HOT 1
- Please add support for Angular v18 HOT 7
- Android rendering? HOT 2
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.