Data.findOne({}).then((respp)=>console.log(respp, "find one")) Like I have this method this is returning First object and if I apply a condition then i can
I'm trying to compile my code as ES code (using "type": "module" inside package.json and "module": "esnext" inside tsconfig.json). I can't run it using any of t
How to sort data based on entry of parent collection in mongodb using mongoose package. My schema is organised as given below Profile Schema const mongoose
I have a REST API which written in NodeJS. The REST API gets a file and information and then uploads the file to the drive and stores the information inside my
I'm trying to pass the convert arguments as string to in() without success. works fine if I run this: const GM = require('gm'); const gm = GM.subClass({ imageMa
I installed nvm in Ubuntu 20.04. Then using nvm I installed node and npm. The general task is to use hardhat in my Solidity project. I created npm project and i
I am learning NodeJS and trying to import and use a method from the crypto package. However, right out of the gate, I get the following error: TypeError: this[
I think I should start off by mentioning I have Mac OS and am using Safari browser. This script is a web-scraper that is supposed to search for a given type of
I have used IIS to host a nodejs API in windows 11(followed these blogs: blog-1 and blog-2). When following blog-1, setting the IP address to IPv6(i am not sure
I have an API coded with Node.js and I use a SQLite database with Sequelize. When I make updates, I use a transaction to rollback if something failed during the
I've built an authorization server with Express.js that works when testing with Postman where it saves the access and rotating refresh token as signed cookies.
I'm on Arco Linux(the most basic one). I have installed the nodejs package with pacman. Now when I run sudo pacman -Su I am getting nodejs-lts-gallium and nodej
I have a TypeScript project that is leveraging ESLint. I have a class that utilizes a Buffer as a class attribute. I want to be able to set the buffer as part
Has anyone successfully upgraded to latest Jest version 28.0.0? I'm receiving an error: Error: Test environment jest-environment-jsdom cannot be found. Make sur
Cookies are not sent to the server via getServerSideProps, here is the code in the front-end: export async function getServerSideProps() { const res = await a
The objective is to convert .m3u8 file(hls stream) to .mp4 video inside my NodeJS application. I've tried doing the same using ffmpeg on console and that works
I must use NodeJs to set different API routes to provide front-end functionalities. I have designed the server as : routes=> controller => models The snip
Can I get a stacktrace from an arbitrary running NodeJS program, preferably without altering the code itself? I can do this trivially for Java but can't seem to
I have a cypress test over an API. When I do cy.getUnits(u.email) I'm expecting a 200 OK response similar to this in the body of the response { &ld
From the nodejs.dev site: npx allows you to run that npm command without installing it first. If the command isn't found, npx will install it into a central ca