Category "node.js"

Javascript doesn't run with both electron and canvas libraries installed

I'm trying to use electron and canvas in the same script, but it throws an error when I try. I've tried using canvas and electron separately with the same node

Acces to XMLHttpRequest at 'https://api-link/login' from origin 'http://localhost/3000' has been blocked by cors policy. (React, , firebase, JWT))

When I try to implement a secure login system in React application with firebase using JSON Web Token (JWT) I am getting this error: Acces to XMLHttpRequest at

Writing to a JSON file from an electron web app

Using electron I have made an app that can generate 6 arrays that create a frame for an animation, these arrays are going to be interpreted by another program t

Why Telegram Message object has steacker field instead photos

When I send a file to the bot, I get a message object with a staker field, on webhook Then i try to get file path by getFile method. And i get the same file pa

NodejS Read/Write Binary Data to/from file

Alright, so I have a string with binary data ("111011 10001 etc"), and I'm trying to save it to a file to them read it on another file using streams, the issue

No environment variables with Next.js TypeScript Custom server

I am currently building a next.js app for a course at uni. I want to run a script when the development server starts that performs some API calls to update the

recoverTypedSignature function on @metamask/eth-sig-util is not working

It seems that every that the updated recoverTypedSignature function on @metamask/eth-sig-util is not working properly. As soon as I add it into the project, it

cURL request with 'User-Agent' header works fine but doesnt work in node with axios/fetch/https

When i make a curl request to a website for webscraping with the header "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0" it wo

How will I get the content ie the title of a tag while web scrapping with puppeteer?

I am following this tutorial. https://www.digitalocean.com/community/tutorials/how-to-scrape-a-website-using-node-js-and-puppeteer I am trying to learn how to u

difference between mongodb and mysqlhow to firebase deploy

I wanted to use the mongodb database, but I noticed that there are two different databases with either their own website and installation methods: mongodb and m

TypeError: Cannot read properties of undefined (reading 'webContents') Electron.JS

Im trying to make an event on keyPress (keyDown) (In electron) but i get this error. TypeError: Cannot read properties of undefined (reading 'webContents') He

How to set req.body for a video tag?

I would like to set a req.body parameter for the request that the video tag is requesting. The Video tag requests at a certain route to request a video stream.

ImageMagick lambda layer aws SAM

I have the following template.yaml from a SAM application AWSTemplateFormatVersion: "2010-09-09" Transform: AWS::Serverless-2016-10-31 Description: > image

why am I getting this "Cannot find module server.js"?

I had a Traversy Media tutorial on how to learn the MERN stack that I was following. I had the first part installed on my desktop and it was working properly. o

node + ts-jest + ESM, jest.mock doing nothing

I am using ts-jest with ESM imports on nodejs. The problem is that my jest.mock is not working, it is not mocking. import { jest } from "@jest/globals"; jest.m

"Not Authorized to access " error on create mutation + GraphQL

I'm running the below GraphQL query to create data on dynamodb table, but gets the response with "Not Authorized to access createClient on type Client" Why this

Mock Injected Twilio Service in Unit Testing Nest.js

I have a problem with overriding provider/setup module testing in nest.js application for testing. Module file: smsModule.ts: import { TwilioService } from './t

Lodash-es with Typescript and Webpack module error

I want to use lodash-es to be able to import only the functions I need, but I get an error. import { camelCase } from "lodash-es"; //... console.log(camelCase('

how can i get the specific info about a user

i'm working on a web app in which a user can create an address when logged in, how can i get the current logged in user address which was created by the user th

DiscordJS MessageManager is a circular dependency

I try to get a message by id in discord.js, but returned MessageManager is a circular dependency and I cannot access any of it's properties. console.log(cha