Category "node.js"

Script Node.js from C# in vscode - Edge.js - Unexpected token

I successfully used vs code to write the sample program to script Node.js from C#. I use the following code block directly from https://github.com/tjanczuk/edge

Calling A Function from the main.ts file to other ts file is not working in Node js

I have a project in Node JS with the following structure: ormconfig.js package.json src main.ts user user.module.ts user.entity.ts user.service.ts (include a fu

Getting null when I use context.query with getServerSideProps() in Nextjs?

Intro Basically, I am building an e-commerce website. But I got stuck in this problem while saving the order details after I click payment button (although I ha

Promisified crypto in node.js

When we check the doc of crypto from https://nodejs.org/api/crypto.html#cryptogeneratekeypairtype-options-callback, we see this sentence. If this method is inv

How can I upgrade Node JS to v14.x with Ionic 3?

According to errors I faced with this TS/Node project (for a simple TypeScript only REST API) the suggested fix (mentioned here (https://github.com/heineiuo/rip

Error: NJS-069: node-oracledb 4.2.0 requires Node.js 8.16 or later

I am using python to host a local web server. I am using oracleDB in a javascript to execute inserts into the DB. I used browserify to compile the modules. Howe

Heroku push for node Js app stuck at Mongodb connection

Just curious if anybody has come across this error. Might be silly. Seems when I am trying to deploy a Node JS express API with a MongoDB atlas connection it ha

Can't read data in node.js from a Ajax POST request

I need help with a very simple problem, but which for some reason I can't solve. I have a ajax post request that send data to a node.js server. From the server

Jest with TypeScript (Backend - Node/Express) says Cannot use import statement outside a module

I am working on Jest tests for a Node/Express TypeScript backend. I recently learnt about global test setup which I am implementing to reduce similar variables

Node JS: execution-time-wise, is generating array of promises and then using Promise.all better than looping and instantly awaiting every task?

Suppose we have an array of objects that we have to upload to a cloud service, the service will do something with each object and the return a result. The servi

Add extra information

I have massively simplified this code, but the idea is that it generates a random number, does an action then tests the response was the same random number gene

How can I redirect login to current page in react js?

I create a single page application using react. I create protected route but after login, I can access login page after login. If I try to go login route I can

Can't find specific single user email query in Mongodb database?

API response show all user data in database to website UI const [product, setProduct] = useState([]); const [user] = useAuthState (auth) useEffect(() => {

Intermittent (time dependent) error when using Node Package rate-limiter-flexible in Express Node.js application

My overall goal is to apply the basic logic of the package "rate-limiter-flexible" for my Express Node.js application. I've gotten the basic functionality with

cURL and shell task

I am using gulpfile.js in my project to download files and it is working fine. var shell = require('gulp-shell'); gulp.task('folder_xyz', shell.task('curl --out

My JavaScript code is memory leaking, but I don't know how to fix

I have a Discord bot written in Nodejs (JavaScript), but I run into a memory leak issue recently. My code is using ~10GB memory, and it keep increasing. I run p

Mikro-ORM disable filter at controller / resolver level

I have two entities and filters with the same name. Note: cond is different for these two entities. @Filter({ name: "myFilter", cond: (args) => ({

Node.js/MongoDB - Returned document seems to revert back to a promise, even after I've awaited it

I'm doing what feels like a simple query, and this is a two part question. The first is whether there's a better way to do it, given my data structure, and the

How to identify a client with nodejs/express?

I am creating a web app that offers a membership access with a trial period. However, I need to be sure the users cannot create a new account with other credent

sendGrid not delivering emails from a node application hosted on vercel

I'm having issues sending emails via a node application hosted on vercel. I'm currently using sendGrid Email API with a verified domain. On development mode, it