intosoft / qrcode Goto Github PK
View Code? Open in Web Editor NEWThe best tool for QR Code generation in JavaScript (React, React Native, Node.js, VueJS, Angular, JQuery, VanillaJS)
Home Page: https://custoqr.com
License: MIT License
The best tool for QR Code generation in JavaScript (React, React Native, Node.js, VueJS, Angular, JQuery, VanillaJS)
Home Page: https://custoqr.com
License: MIT License
Hi !
Very nice lib with very nice QRcodes render !
I love your lib, thank you very much to share your work.
I have also a problem with NodeJs :
For an old project on Node V 13.7.0, when i include your lib :
const custoqr = require("@intosoft/custoqr");
I get an error :
\node_modules\@intosoft\custoqr\dist\index.js:4
`,n=0;return r.forEach(s=>{let i=s?.percentage?s.percentage:`${n}%`;e+=` <stop offset="${i}" style="stop-color:${s?.color};stop-opacity:1" />
^
SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:1067:16)
at Module._compile (internal/modules/cjs/loader.js:1115:27)
I tested it with NodeJS V 18.10.0 and another error occured :
node_modules\@intosoft\custoqr\dist\index.js:58
</svg>`};var vt={generateSVGString:I,generateContentString:A};window&&(window.custoqr={generateSVGString:I,generateContentString:A});0&&(module.exports={generateContentString,generateSVGString});
^
ReferenceError: window is not defined
Can you help me with it ?
If it could run on nodeJS 13.7.0, it would be perfect !
Many Thanks !
Hi, followed instructions for VanillaJS in https://www.custoqr.com/, I double-checked before posting, but it could be me anyway... I'm testing the simplest possible use case (a simple html file with nothing else but this library), and while loading console comes with two errors:
Uncaught Error: Dynamic require of "fs" is not supported
...
And as consequence:
Uncaught TypeError: can't access property "generateSVGString", window.custoqr is undefined
...
I'm testing in Google Chrome and Mozilla Firefox (both dev versions), any suggestions?
Hoping to get it working, it's a very cool tool ;) thanks in advance.
Regards
An error appears when using the library in NodeJs, in the index.js file related to the window object.
I solved it as follows:
if (typeof window !== 'undefined') {...}
Take it into account for the next update @sakul-budhathoki.
Thaks.
How I can get base64 string of qrcode in react native app?
Hi !
I've got a problem importing this library on Angular environment :
ERROR in node_modules/@intosoft/custoqr/dist/index.d.ts:5:1 - error TS1128: Declaration or statement expected.
5 export type { Config, WifiEncryption, BodyShape, EyeFrameShape, EyeballShape };
node_modules/@intosoft/custoqr/dist/index.d.ts:5:13 - error TS1005: ';' expected.
5 export type { Config, WifiEncryption, BodyShape, EyeFrameShape, EyeballShape };
ERROR in ./src/app/modules/directives/partials/qrCode/qrCode.partial.ts
Module not found: Error: Can't resolve '@intosoft/custoqr/dist/generateSVGString' in 'W:\www...'
i 「wdm」: Failed to compile.
It seems that index.d.ts is not correct on Angular. Do you have a solution ?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.