Leke
Leke
Explore posts from servers
TTCTheo's Typesafe Cult
Created by Leke on 5/29/2023 in #questions
[vite-plugin-sass] Unexpected token u in JSON at position 0 error
Fixed >>Thanks
3 replies
TTCTheo's Typesafe Cult
Created by Leke on 3/1/2023 in #questions
node-canvas error
Works fine on my remote sever
6 replies
TTCTheo's Typesafe Cult
Created by Leke on 3/1/2023 in #questions
node-canvas error
Honestly when i deployed the runs smoothly on my server
6 replies
TTCTheo's Typesafe Cult
Created by Leke on 3/1/2023 in #questions
node-canvas error
const express = require('express');
const JsBarcode = require('jsbarcode');
const { createCanvas } = require('canvas');

const { handleErrors } = require('../helpers');

const router = new express.Router();

// Generate Barcode
router.get('/barcode', async (req, res) => {
const { data } = req.params;

try {
if (!data) {
return res.status(404).send();
}

const canvas = createCanvas(250, 100, 'image');
JsBarcode(canvas, data, {
fontSize: 24,
fontOptions: 'bold',
mod43: true,
});
const buffer = canvas.toBuffer();

res.set('Content-Type', 'image/png');
res.status(200).send(buffer);
} catch (e) {
handleErrors(e, res);
}
});

module.exports = router;
const express = require('express');
const JsBarcode = require('jsbarcode');
const { createCanvas } = require('canvas');

const { handleErrors } = require('../helpers');

const router = new express.Router();

// Generate Barcode
router.get('/barcode', async (req, res) => {
const { data } = req.params;

try {
if (!data) {
return res.status(404).send();
}

const canvas = createCanvas(250, 100, 'image');
JsBarcode(canvas, data, {
fontSize: 24,
fontOptions: 'bold',
mod43: true,
});
const buffer = canvas.toBuffer();

res.set('Content-Type', 'image/png');
res.status(200).send(buffer);
} catch (e) {
handleErrors(e, res);
}
});

module.exports = router;
6 replies
TTCTheo's Typesafe Cult
Created by Leke on 2/21/2023 in #questions
Auto select country flag when country code is provided
Thanks
3 replies
TTCTheo's Typesafe Cult
Created by Leke on 2/8/2023 in #questions
`Cant install mongodb on mac`
ok thanks
28 replies
TTCTheo's Typesafe Cult
Created by Leke on 2/8/2023 in #questions
`Cant install mongodb on mac`
do i have to update macos version ?
28 replies
TTCTheo's Typesafe Cult
Created by Leke on 1/31/2023 in #questions
`window.scrollY` error `typescript`
Thanks
3 replies
TTCTheo's Typesafe Cult
Created by Leke on 1/16/2023 in #questions
canvas.node
I have a project I'm trynna run for the first time, the codebase is an API backend written with express, so I tried running npm install script on it but some errors showed up about sharp and canvas which I really did install the two packages separately but when I tried running the project this error below keeps coming up.
node:internal/modules/cjs/loader:1203
return process.dlopen(module, path.toNamespacedPath(filename));
^

Error: The specified procedure could not be found.
\\?\..api\node_modules\canvas\build\Release\canvas.node
node:internal/modules/cjs/loader:1203
return process.dlopen(module, path.toNamespacedPath(filename));
^

Error: The specified procedure could not be found.
\\?\..api\node_modules\canvas\build\Release\canvas.node
I've seen some discussion regarding sharp and canvas that sharp wont run canvas which is why keep getting this error.
3 replies
TTCTheo's Typesafe Cult
Created by Leke on 11/27/2022 in #questions
'paginationRange.length' is possibly 'undefined'.ts(18048)
Resolved thanks
4 replies
TTCTheo's Typesafe Cult
Created by Leke on 11/18/2022 in #questions
can i export data from reactQuery?
@Neto i still don't get your explanation
13 replies
TTCTheo's Typesafe Cult
Created by Leke on 11/10/2022 in #questions
React + Typescript...Its return type 'Element | undefined' is not a valid JSX element.
Thank you
27 replies
TTCTheo's Typesafe Cult
Created by Leke on 11/10/2022 in #questions
React + Typescript...Its return type 'Element | undefined' is not a valid JSX element.
I have resolved it
27 replies
TTCTheo's Typesafe Cult
Created by Leke on 11/10/2022 in #questions
React + Typescript...Its return type 'Element | undefined' is not a valid JSX element.
27 replies
TTCTheo's Typesafe Cult
Created by Leke on 11/10/2022 in #questions
React + Typescript...Its return type 'Element | undefined' is not a valid JSX element.
27 replies
TTCTheo's Typesafe Cult
Created by Leke on 11/10/2022 in #questions
React + Typescript...Its return type 'Element | undefined' is not a valid JSX element.
The error still persist
27 replies
TTCTheo's Typesafe Cult
Created by Leke on 11/10/2022 in #questions
React + Typescript...Its return type 'Element | undefined' is not a valid JSX element.
27 replies
TTCTheo's Typesafe Cult
Created by Leke on 11/10/2022 in #questions
React + Typescript...Its return type 'Element | undefined' is not a valid JSX element.
its not working
27 replies
TTCTheo's Typesafe Cult
Created by Leke on 11/10/2022 in #questions
React + Typescript...Its return type 'Element | undefined' is not a valid JSX element.
27 replies
TTCTheo's Typesafe Cult
Created by Leke on 11/10/2022 in #questions
React + Typescript...Its return type 'Element | undefined' is not a valid JSX element.
but i have another error
27 replies