Code Monkey home page Code Monkey logo

qrcode's People

Contributors

sakul-budhathoki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

subaseyy

qrcode's Issues

Problem with NodeJS

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 !

Can't get the vanilla version to work

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

Error in NodeJS

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.

Can't import custoqr on Angular V8

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

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.