Category "node.js"

Openpgp Encrypt with PGP

I am trying to encrypt a message using PGP but I am getting an error that states: ReferenceError: TextDecoder is not defined at Object.decodeUTF8 (node_m

How can i fix Error: Cannot find module. Using sequelize, express, node and mysql

Can some one help me? Node v16.15.0 "body-parser": "^1.20.0", "express": "^4.18.1", "mysql2": "^2.3.3", "path": "^0.12.7", "sequelize": "^6.19.0", "sequelize-cl

Hardhat: ProviderError: The execution failed due to an exception

I'm deploying contracts with hardhat, but cannot use address type in contracts ProviderError: The execution failed due to an exception. at HttpProvider.requ

Integrate jsdoc into docsify

Im trying to document my node.js/javascript application. The frontend is a vue app & backend a node.js app. I use jsdoc to document classes/modules etc. and

Formidable returns TypeError, ERR_INVALID_ARG_TYPE: The "path" argument is undefined

I'm having trouble uploading files using formidable. I'm on Windows server 2016. My code, which in its entirely is shown below, is based on https://www.geeksfor

How to get a JWT token from one server to another in order to validate APIs which is running on different ports in node & express?

I have two modules in two different server i.e., User and transaction module. User module has one Login API which generates the JWT token, Now I want to send th

HTTP Response Error - Firebase + Node JS 16

I've reduced my code to the bare minimum to troubleshoot why I receive a response error when I put a HTTP request in. I first receive a status 200 message upon

How to send files using socket io in react js, node js and store in mysql database?

I am building a chat application like discord, I can successfully send a chat message, and i am trying to send emojis, files like image, pdf, docx, links. How t

How to get Digitalocean environment variable?

I set an environment variable in Digitalocean with token, but I don't understand how to use it in the code. I scrolled through the docs, but didn't get anything

Where is node-redis v4 documentation/migration guide?

node-redis refactored its API in v4 to support Promises. For some reason, they also decided to change the signature of most commands, which now don't obey any a

cann't decrease a value by one in the UI with node.js mongodb, react

I am trying to update a value in the UI. When I click to update, I have a button that will decrease by one In the database and be displayed in the UI's quantity

Mongoose - get all requried fields only from the schema

I want to apply validation on controller level similar to what we have in a Form Request in Laravel but I want that in Node JS. I want to know the required fiel

How to build a TypeScript shell command that installs portably and globally?

I would like to build a command-line tool written in TypeScript that becomes available in the $PATH when installed. My requirements: I can run and test it from

How can I solve a "MongoError: E11000 duplicate key error collection" error in Mongo?

I have created a new Mongo collection to a new project, but when I try to create a new user, I get the following error: MongoError: E11000 duplicate key error c

'The "path" argument must be of type string. Received null' in electron-json-storage

I'm using eletron-json-storage like this: settings.js: const storage = require('electron-json-storage'); const defaultStoragePath = storage.getDefaultDataP

Unable to resolve npm install pre-gyp error

I am trying to install this app locally on my m1 MacBook air > Github - Todoist Clone Running npm install in the terminal is causing the following error, ple

Installing different Node version in wsl 2

I am trying to update my Nodejs to the latest version in WSL 2. My old version is v15.0.0 and is installed at active : v15.0.0 at /home/sathish/.nvm/versions/no

How to make React search component

I am doing my first Ecommerce MERN stack project but i donot know how to make search component that will take the search input and return array of matching prod

Discord Music Bot Wont Boot

So Im making a discord music bot (not for public) and its based off some github code and I put it in and gives me this, I had the node:events problem and fixed

Mapping a Subdomain to a NodeJS web server running in a docker container with a specific port?

I have a server running Pterodactyl panel which uses Docker. I'm using a Nodemon js egg to run a Node JS webserver I developed. The server uses 5500 as the port