Giter Club home page Giter Club logo

qrcode-with-logos's Introduction


Hi, I'm zxpsuper(小皮咖).


Glad to see you here!

Greetings and salutations, fellow coders!

I am a front-end engineer based in Guangzhou, China, passionate about creating amazing digital experiences.

I'm always up for a good coding challenge, a lively debate about the merits of different programming languages.

So if you're looking for a developer who's equal parts creative and strategic, please drop me a line and let's build something amazing together!

📫 How to reach me: [email protected]

Languages and Tools:

GitHub Streak   

qrcode-with-logos's People

Contributors

dependabot[bot] avatar jinyang1994 avatar mjend7 avatar zxpsuper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

qrcode-with-logos's Issues

global is not defined

the line

var QRCode = require("qrcode");

in your module causes "global is not defined".

package.json in my case:

...
"dependencies": {
    "@angular/common": "~9.0.4",
    "@angular/core": "~9.0.4",
...
declare var global: any;

in my component doesn't help

Importing issues with the package

Hey, I am trying to import your package but I am getting this error,

import QRCodeWithLogos from 'qrcode-with-logos';
new QRCodeWithLogos({...});

I am using NodeJS v16. Please let me know if you need more details.

Looks like you do have a default export, but I am not sure why its not working.
https://github.com/zxpsuper/qrcode-with-logos/blob/master/src/index.ts#L62

TypeError: qrcode_with_logos_1.default is not a constructor
    at generateQrCode (..\src\promotion\qr\qr.controller.ts:18:33)
    at QRController.createQR (..\src\promotion\qr\qr.controller.ts:43:26)
    at ..\node_modules\@nestjs\core\router\router-execution-context.js:38:29       
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at ..\node_modules\@nestjs\core\router\router-execution-context.js:46:28       
    at ..\node_modules\@nestjs\core\router\router-proxy.js:9:17

Fixed with using require, but then I ran into this,

ReferenceError: document is not defined
    at new QrCodeWithLogo (..\node_modules\qrcode-with-logos\lib\qrcode-with-logos.common.js:298:34)
    at generateQrCode (..\src\promotion\qr\qr.controller.ts:19:33)
    at QRController.createQR (..\src\promotion\qr\qr.controller.ts:43:26)
    at ..\node_modules\@nestjs\core\router\router-execution-context.js:38:29       
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at ..\node_modules\@nestjs\core\router\router-execution-context.js:46:28       
    at ..\node_modules\@nestjs\core\router\router-proxy.js:9:17

I guess this is only browser-based, and you can't use it with Node?

Promise never throw reject when generate image failed

`let qrLogo = new IQrCodeWithLogo({
                content: contact.linkURL,
                width: 380,
                image: image,
                logo: {
                    src: this.remoteUrl+ imageName + '.png'
                }
            });`

when I can't download the logo, I don't know if the QR is generated or not.

Release new version

Sorry, can you release a new version of the NPM package? The last version is from 2020, and since then there was various fixes that where added

Error "require is not defined" using the npm package

Hello,

I'm using your (great) package version 1.0.5 in a Laravel project. My assets are bundled using Vite.
After building my assets for prod, I have an error "require is not defined" in my console. I tracked down the error to this code:

// import QRCode from "qrcode"
var QRCode = require("qrcode");

in lib/qrcode-with-logos.esm.js

When editing directly this file in my node_modules and using the commented import, it works just fine.

I checked in the repo and there is a pull request #15 that mentions this.

Is this something I can somehow fix on my part or should it be changed in the npm package?

Thank you for looking into this!

Typescript definition error

I think your typescript definition is not correct, here is my usage and error message.

import QrCodeWithLogo from 'qrcode-with-logos';


const qrcode = new QrCodeWithLogo({
content: "https://github.com/zxpsuper",
image: document.getElementById("logo"),
width: 470,
  logo: {
     src: "logo_round.png",
 },
});

Error message:

(alias) const QrCodeWithLogo: IQrCodeWithLogo
import QrCodeWithLogo
This expression is not constructable.
Type 'IQrCodeWithLogo' has no construct signatures.

different qr code style

Hey,

would it be possible to use differnt style qr codes like the google chrome dev inbuild
Bildschirmfoto von 2020-10-09 16-28-26

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.