Category "node.js"

how to update older node project with ts and js scripts

What should I do if I want to run an older node.js project from GitHub? Eg. project: jaystack odata-v4-server-mysql-example (6 years old, at that time, node.js

Schema for saving a lot of questions MongoDb

If I have a survey application for child tracking what is the best way to save survey questions in MongoDB? Knowing that survey is divided into stages (about 12

How to add random minutes like first slots should be 30 minutes and then 1 of 15 minute slot and again 30 minute slot

const eventClick = (args) => { let StartTime = moment(args?.event?.StartTime, 'HH:mm ') let EndTime = moment(args?.event?.EndTime, 'HH:mm ') if (

why ejs displays file.forEach is not a function

I have the following error TypeError: C:\Users\USER PC\Documents\Prime_News_Hub\views\Top_Stories.ejs:27 25| 26| <% if(file){ %>

Next auth getSession with typescript

I am using next-auth getSession in API routes like this const mySession = await getSession({ req }); I am certain that the type of the mySession is this type S

How to add the value passed in the view to a href attribute in a pug view

Here is the function passing the data to the view I don't understand what i am doing wrong that i receive an error at this line when the view is loaded a(href="

Nodejs concatenating numbers as a string

This function is triggered on button click nextPage() { this.tweets = [] this.$route.query.page += 1 this.getTweets() }, What it's doing is resetting arr

code ERESOLVE when running the command npm install

I'm new to ReactJS and tried to run a code in VS Code using npm install command and this error pops up: npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resol

Mock 'S3' feature of 'aws-sdk' (nodeJS and Jest)

I need to test a file in charge of retrieving data from S3 through the 'aws-sdk' (nodeJs + Jest). The file is: const AWS = require('aws-sdk'); let S3 = null;

How can I pass in an unknown amount of objects in a dynamic react form to my sql database?

I'm having trouble connecting 0-6 dynamically rendered form elements to the backend/database using react. Perhaps the way I'm attempting to do this is not suppo

Using Auth0 with NestJS on gRPC Methods

I am trying to implement NestJS Guards for Authentication and Authorization to my gRPC Services, which are implemented in NestJS. @GrpcMethod(USER_SERVICE_NAME,

Laravel Mix HMR Server Does Not Launch

Laravel Mix Version: 6.0.43 Node Version (node -v): 16.13.1 NPM Version (npm -v): 8.1.2 OS: Windows 10 21h2 Description: THIS IS HAPPENING ON A FRESH NEW INSTAL

How do I copy to clipboard using clipboardy?

I am trying to use clipboard in order to copy 'longlat' to the clipboard by passing it through the function 'copyData()'. However, it keeps giving me errors. Th

Mongoose data Writing issue in Javascript

Just started with a javascript couple of days back. I am trying to use MongoDB with mongoose to write the data but it is not writing even though the connection

I get error when running npm start in vs code

(node:6852) [LRU_CACHE_OPTION_maxAge] DeprecationWarning: The maxAge option is deprecated. please use options.ttl instead (Use `node --trace-deprecation ...` to

is installing mongodb on cpanel reliable?

CPanel says that it does not support mongo installation but I can install it manually. My question is should I install it or just subscribe mongo atlas and conn

Get updated value from database

How do I watch for a specifc Mongodb-query? Currently I have tried with collection.watch(), but I am only getting the new value. An example: user1 = [user3, use

I can't solve the dependency tree every time i try to install @craco/craco

Unable to solve dependency tree trying to install tailwind. This is my package.json: { "name": "front-end", "version": "0.1.0", "private": true, "devDep

How to remove "Waiting for the debugger to disconnect..." from VSCode console

When I run anything in the VSCode console it shows Debugger listening on ws://127.0.0.1:51890/cf1cb459-52b1-447f-8f78-aa5e8ff4caef For help, see: https://nodejs

How can i intercept third-party https request call, block it from going out and send my own response? Is it possible to do?

I can log all outgoing api calls to third parties that happen via sdk functions, but I need to prevent them from going out and provide my own custom answer inst