Category "node.js"

upload image using react react and nodejs

i am trying to upload image path in mysql database and show it in homescreen .currently i am having difficulty in storing image path in my sql database and imag

Error while running the command npm install

I'm trying to run a react code and used the command npm install and error(s) pop up: npm ERR! code ENOENT npm ERR! syscall open npm ERR! path C:\Users\AJ\Deskto

Posts text and image to pdf in react

I'm trying to create a blog post website where anyone can post anything. And also any user can download any post in one click. So is it possible to implement a

jest supertest with express-session

I want to test my routes with jest but I don't know how to mock or simulate a session in my test to pass the first if line 2 app.get('/getMailSuiviList', (req,

How to update a single property using PATCH method in Node JS? [closed]

I want to create a PATCH method to update a single property for my API but there is something I don't understand.

npm WARN deprecated [email protected]

Even though Ive updated tar to version 8.3.1 it doesn't allow me to install react(npm install -g create-react-app). After I try to install react it outputs foll

Why doesn't setting NodeJS module cache to false get NodeJS to reload module?

I have 2 files, one named one.js and other name first.js.one.js var first = require("./first.js") require.cache[first.module.id].loaded=false require("./first.j

Unable to run npm install in a gatsby project

I'm working on a project where I'm unable to run npm install as I'm getting the following error. npm WARN deprecated [email protected]: Critical security vulnerabili

node.js get https no responding 504

I am trying to make an https request in my backend node.js web app. I have the following code: const express = require('express'); const https = require('https'

How to fix Error with alchemy-web3 - Webpack < 5

interact.js require('dotenv').config(); const alchemyKey = process.env.REACT_APP_ALCHEMY_KEY; import { createAlchemyWeb3 } from "@alch/alchemy-web3"; const web3

How to fix Error with alchemy-web3 - Webpack < 5

interact.js require('dotenv').config(); const alchemyKey = process.env.REACT_APP_ALCHEMY_KEY; import { createAlchemyWeb3 } from "@alch/alchemy-web3"; const web3

Unable to receive files in request using express-fileupload

I use a REST client to test my app (Insomnia and postman). My app literally does nothing: const express = require('express'); const app = express(); const fileU

npm error transpileDependencies.map is not a function

this gives me an error when I try to run the program I deleted node and reinstalled, but it still gives an error

Sequelize how to return result as a 2D array instead of array of objects?

I am using Sequelize query() method as follows: const sequelize = new Sequelize(...); ... // IMPORTANT: No changed allowed on this query const queryFromUser = "

"Illegal argument to function" in Postgres when doing select on a view with pgp_sym_decrypt() expression

I am using pg_sym_decrypt/encrypt to decrypt/encrypt some of the fields in my table. Decryption happens on select in a separate EntityComputed view that has a o

Sencha Architect model REST proxy gives error

I have a local Nodejs server running on port 5000. I use Sencha Architect and I want to load the API with the name "getUsers" from my Nodejs server. Here's my m

Mongoose.connect keeps coming back undefined

I have this mongoose.connect statement in my server.js file: const db = mongoose.connect(config.db, { 'useNewUrlParser': true, 'useUnifiedTopology': tru

How to automate my first Telegram application?

I'm just learning the backend. I created my first application, all it does is get data -> publish it to a Telegram bot. I want the application to work 24/7.

Node.js EJS Include feature is not working in my case

I want to include header.ejs and footer.ejs into order.ejs. The image below my folder structure. But, I've got error. The code related to include in order.ejs

unable to determine transport target for "pino-pretty"

I am trying to use pino library but I am getting error My code I created a logger.js file and imported pino from node_module and added transport of pino-pretty.