Category "node.js"

How can I send documents with http request to power automate?

How can I send array documents and images with an HTTP request to power automate? I am using type script with nodejs as backend. Please see the code I am using

OrbitDB can't replicate database on different peer

I have forced with problem in my p2p database orbitdb. Everything works fine while I did not move the database to another server. const ipfsOptions = { repo

Why can't I connect to mongoDB atlas?

I am new in MongoDB, all my life I used MySQL. I have created an account in atlas, set the IP to my IP and created a user and saved the password. here is my cod

Image cannot be an array or an object

I am developing a project which consists of publishing a post and being able to upload a user image. I used JS for Front and NodeJs for Back (Multer for uploadi

How to get value from db.any() promise in pg-promise?

I use pg-promise and i tried to make a request to database in user model to get an array of all users like this: exports.getAllUsers = function () { let

how to deploy frontend(React.js) and backend(Node.js) in a single Heroku app

I have a parent folder named "app" and it has 2 children folders, "frontend" "backend" obviously both have different package.json files. In order to deploy it t

Next.js API routes all return "Interval Server Error" in production, but all the routes work in development

Whenever I go to any API route in my Next.js app in production it returns a 500 "Internal Server Error" but in development, all of them work completely fine and

countDocuments() is not working in api call

I am trying to get a count of products using api calls but in postman its keep loading router.get(`/get/count`, async (req, res) => { const productCount =

why npm install does not respect version in package.json

Nodejs version - 14.17.3 npm version - 6.14.13 I am confused over the difference in package versions - the one I have declared in package.json is different than

MongoStore.create({ ..............Cannot read property 'create' of undefined

I have tried every possible step I've come across but the problem doesn't resolve. The error shows: C:\Users\...............\server.js:35 store: MongoStore.crea

Failed to connect SQL Server from Node.js using tedious

I am trying to connect to SQL Server in our domain network. I am able to connect using python but not able to connect in Node.js using Tedious. Node.js code sni

How to solve AWS Elastic Beanstalk 504 Timeout Error?

I am using AWS Elastic Beanstalk for hosting Express/Node.js API server. It's working well with just normal APIs but I am getting this 504 Timeout error with on

Client-side jwt token storage

I need advice, what is the best way to store a JWT token? Should we store in cookies or storages? But with the CSRF flaw and xss attacks I have a doubt. I'm sti

why I can't get all folder's module with require('./folder')

i am using this: index.js functions └abc.js └reset.js functions.js functions.js const fs = require("fs") const functions_ = {} const files = fs.re

While deploy the MERN Stack at DigitalOcean error TextEncoder is not defined

My app works on development but gives Text Encoder error in production. When I run the Node index.js command, I get the error "TextEncoder is not defined". Erro

How do i solve this node.js error when im calling it with jQuery?

I have this assignment and I'm a bit stuck. When I press the button on the site the console I get this error: GET http://localhost:3000/getUser 404 (Not Found)

bybit api spot order create nodejs

I'm using bybit api to create an order on the spot market in nodejs. i tried the below code: var params = { api_key: api['key'], qty: 30, symbol: "E

How to click on the reCAPTCHA using webdriverio

Hi everyone can you help me with that problem? I'm trying to enter inside the iframe of google reCAPTCHA. Tried several ways to click but didn't work with the i

Yarn - How do I update each dependency in package.json to the latest version?

I have a react app with deprecated dependencies. To make it work, I have to update the dependencies to their newer (but stable) versions. As per this stakoverfl

webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case

im getting the errors: 22 errors have detailed information that is not shown. Failed to compile. webpack < 5 used to include polyfills for node.js core modul