Category "node.js"

How to remove duplicate object in javascript?

I have object like this : cons data = [] const result = [ { "result_id": "AAA877", "emp_id": 1, "hashtag": [ {

How to assign ROLES in _user DB for Cloudant

How do I add Roles to users in the Cloudant user database?(_users) I have not been able to sort this out using Google or Cloudant Docs. I see some mention of a

How to resolve or reject a promise from the result of another promise?

Really sorry if this has been answered, I've searched everywhere and can't find the exact problem I'm facing. Take this as the example: const fetchData = (email

Context is empty in GraphQL middleware

I'm sending from frontend authorization token in headers and then I want to check validity of this token in some endpoints using middleware and context, but con

GitLab pipeline with dotnet and node image

I'm creating a GitLab pipeline which should build, test and deploy a dotnet core application with Angular application. So far so good! This project was created

Postgres, Node, Jest - Splitting testes into two suites results in deadlock

I have two suites of tests, one for Accounts and one for Transactions, accounts.spec.js and transactions.spec.js. I'm also using supertest. When I run them in j

Using Node.js as an alternative of Spring MVC project

Hello to everyone who is viewing this question. I am currently running a web-application server, which only does CRUD operation (using MySQL) for android and iO

SyntaxError: Unexpected reserved word => prettier/third-party.js

I'm pretty new to Node, npm and webpack. I'm trying to set up a Craft 3 environment with Tailwind css. Everything worked fine out of the box, but when i run npm

Node.js x React x Auth0 - getting error 500 with docker-compose deployment

I'm creating a WebApp that has a React front end whose build is served by a node.js back end. There is some security implementation using Auth0 token validation

How to remove HTML tag (not a specific tag ) with content from a string in javascript

Is there any way to strip HMTL tag with content in HTML example : const regexForStripHTML = /(<([^>]+)>)/gi const text = "OCEP <sup>&reg;&l

Sequelize dialect dependency on msnodesqlv8

We are using sequelize package to connect to mssql server. Our backend code is in javascript. We have a working code like below: const sequelize = new Sequelize

How to use template literals of ES6 script

I have been trying to solve a template literal question on hackerrank. It works fine on my local IDE but giving error on Hackerrank IDE. Heres the code two add

NodeJS with ESM: internal/process/promises:246 | triggerUncaughtException(err, true /* fromPromise */) | finalizer.unsubscribe is not a function

I am creating an observable (RxJS) in NodeJS using ESM. Inside the observable I am performing a query with mongoose. I get the result, but the console returns e

How to convert Web Stream to NodeJS native Stream

I am taking file input from user as <input type="file"/> It returns file object has Blob. This object has a method .stream() which returns ReadableStream

NPM installation

C:\WINDOWS\system32>npm install npm@latest -g npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation

NodeJS Sync call - PDF Reader

I'm facing a problem to read PDF file synchronously. To show what I'm trying to do, I create this sample code: var pdfUtil = require('pdf-to-text'); var pdf_pat

process is defined well from bootstrap.js but undefined inside the react code

I`m working on Nodejs app, which includes Front-end react that calls back-end api (Typescript). The app is working great in development; but not in production.

Need help joining 2 tables on one [duplicate]

So I got an admin dashboard which are not linked by ID but by name. So developer.name is the core name, dateName and absentName are meant to j

How to create empty (immideately completed) ReadWriteStream in NodeJS?

How to create empty NodeJS.ReadWriteStream which will immideately stopped? If you are interesting why I need to do this, I am developing the function for Gulp,

dockerizing Laravel + vue

Trying to migrate my Laravel and Vue code into docker but I am getting an error building the Image This is my docker file # dockerfile FROM php:8-fpm #