Coder Social home page Coder Social logo

Can I npm install ? about qrcodejs HOT 16 CLOSED

mengru0102 avatar mengru0102 commented on September 17, 2024
Can I npm install ?

from qrcodejs.

Comments (16)

fladna9 avatar fladna9 commented on September 17, 2024

Hi @mengru0102, just saw your issue and mail.
There were no npm package before (not needed), there's one now:
npm i @keeex/qrcodejs-kx

from qrcodejs.

fladna9 avatar fladna9 commented on September 17, 2024

Closing the issue, feel free to reopen if it doesn't work.

from qrcodejs.

 avatar commented on September 17, 2024

thanks your npm package. Just I try it and find it can't work normally, it shows: __WEBPACK_IMPORTED_MODULE_4__keeex_qrcodejs_kx___default.a is not a constructor

from qrcodejs.

 avatar commented on September 17, 2024

I use it "import QRCode from '@keeex/qrcodejs-kx'" in my VUE project now. it shows: __WEBPACK_IMPORTED_MODULE_4__keeex_qrcodejs_kx___default.a is not a constructor.
And I use it "import QRCode from 'qrcodejs2" before you fixed it, and no problems except overflows

from qrcodejs.

 avatar commented on September 17, 2024

And I find it has only four files in folder, they're LICENCE, package.json, qrcode.min.js, README.md
I think whether it is short of something.

from qrcodejs.

fladna9 avatar fladna9 commented on September 17, 2024

Hi @mengru19950102 (profile changed?),
I'll see this with my colleague tomorrow (it's 10:30 PM here ^_^) to test the NPM package.

For the "short of file" package, all other files are only needed for demo purposes.

  • LICENSE is mandatory, and is the license file,
  • README.md is the readme file,
  • qrcode.min.js is the minified qrcodejs version,
  • package.json is the npm package "definition"

As for non included:

  • index-svg.html is only a demo HTML file (not required)
  • index.html is only a demo HTML file (not required)
  • qrcode.js is the non minified version of qrcodejs (not required).

Will come back to you soon, maybe with a package update.
Reopening issue.

from qrcodejs.

 avatar commented on September 17, 2024

ok, waiting for your reply.

from qrcodejs.

 avatar commented on September 17, 2024

I beg your pardon……whether you test the package, bacause my project is urgent. Wish for your help.

from qrcodejs.

fladna9 avatar fladna9 commented on September 17, 2024

If your project is urgent, i might recommend you to wget the file via the command:
https://raw.githubusercontent.com/KeeeX/qrcodejs/master/qrcode.min.js
and use this file.
I'm sorry but i don't have time to dig this NPM package oddities further in the next following days. I'll update this as I have time to do it.

from qrcodejs.

CleyFaye avatar CleyFaye commented on September 17, 2024

In the meantime, you can try https://github.com/CleyFaye/qrcodejs to see if it fix your issue with webpack.

from qrcodejs.

 avatar commented on September 17, 2024

@CleyFaye Whether can I npm install derictly? And What's name ?

from qrcodejs.

 avatar commented on September 17, 2024

@CleyFaye ok.I will have a try. Thanks.

from qrcodejs.

CleyFaye avatar CleyFaye commented on September 17, 2024

Just use
npm install https://github.com/CleyFaye/qrcodejs.git
and
import QRCode from '@keeex/qrcodejs-kx
to test.
I'm afraid if this doesn't work I won't be able to put much more time on this either.

from qrcodejs.

 avatar commented on September 17, 2024

It's normal now. Can you help to publish a npm package ?

from qrcodejs.

craig-wagner avatar craig-wagner commented on September 17, 2024

FWIW, I did:

npm i @keeex/qrcodejs-kx

Then in my vue component I added:

import QRCode from '@keeex/qrcodejs-kx/qrcode.min.js';

I was then able to use the object to create a QR code:

            const qrcode = new QRCode(document.getElementById('qrcode'), {
                text: baseUrl + this.$route.query.o,
                width: 150,
                height: 150,
                colorDark: '#000',
                colorLight: '#FFF',
                correctLevel: QRCode.CorrectLevel.H,
            });

from qrcodejs.

CleyFaye avatar CleyFaye commented on September 17, 2024

Turns out in the meantime my fix for webpack was merged and published on npmjs.

from qrcodejs.

Related Issues (4)

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.