loskir / styled-qr-code Goto Github PK
View Code? Open in Web Editor NEWThis project forked from kilianb/styled-qr-code
Automaticly generate your styled QR code in your web app.
Home Page: https://qr-code-styling.com
License: MIT License
This project forked from kilianb/styled-qr-code
Automaticly generate your styled QR code in your web app.
Home Page: https://qr-code-styling.com
License: MIT License
I have an issues when referencing SVG images for embedding in the center like:
image: "https://upload.wikimedia.org/wikipedia/commons/f/f5/History_Logo.svg",
Then I get the following error:
else onerror(new Error("Could not decode image data"))
^
Error: Could not decode image data
at C:\Development\Node.js - QR API\node_modules\skia-canvas\lib\index.js:880:24
at C:\Development\Node.js - QR API\node_modules\skia-canvas\node_modules\simple-get\index.js:98:7
at PassThrough. (C:\Development\Node.js - QR API\node_modules\simple-concat\index.js:8:13)
at Object.onceWrapper (node:events:632:28)
at PassThrough.emit (node:events:530:35)
at endReadableNT (node:internal/streams/readable:1696:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Node.js v20.12.2
I am using VS Code - and test in the terminal - it works with PNG logo files.
Hey, I'm having an issue:
import { QRCodeCanvas } from "@loskir/styled-qr-code-node";
import fs from "fs";
const qrCode = new QRCodeCanvas({
width: 300,
height: 300,
data: "https://www.facebook.com/",
image: "https://qr-code-styling.com/0b3922d9d1e466270a79706c08c4a57c.png",
dotsOptions: {
color: "#4267b2",
type: "rounded",
},
backgroundOptions: {
color: "#e9ebee",
},
imageOptions: {
hideBackgroundDots: true,
imageSize: 0.4,
crossOrigin: "anonymous",
margin: 0,
},
});
(async () => {
await qrCode.toFile("qr-code.png", "png");
})();
Firstly, thank you for developing this, it seems like a lot of noise to get this working in Node, so, thanks for contributing to the open source community.
When I installed this and run it, I am getting this error
Cannot find module './v6' from 'node_modules/skia-canvas/lib/index.js'
Require stack:
node_modules/skia-canvas/lib/index.js
node_modules/@loskir/styled-qr-code-node/dist/index.js
src/modules/qrcodes/qrcode.service.ts
import { QRCodeCanvas } from "@loskir/styled-qr-code-node";
const qrCode = new QRCodeCanvas({
data: "https://example.com",
});
Node: v19.0.0
NPM: 9.4.2
Please advise on what else you would need to help.
Thank you in advanced.
It was working well on local, but start getting error while deployed on Render
Node
FROM node:21.5.0-alpine
Shell uname
Linux srv-cir6bq5gkuvqadosit5g-7c9bc6977f-z6pcl 5.15.0-1032-gke kozakdenys#37-Ubuntu SMP Wed Apr 19 21:06:04 UTC 2023 x86_64 Linux
I have tried
apk add fontconfig
apk --no-cache add fontconfig
npm i skia-canvas
in the project
Trying to upload Next.js app to Vercel. I'm getting this error:
Error: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /vercel/path0/node_modules/skia-canvas/lib/v6/index.node)
22:17:07.555
I tried to change node versions, 16 and 18 and it still doesn't work. Is there anything we can do?
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.