Category "node.js"

npm ci passing locally but failed on gitlab

Getting this error during npm ci command, but it is working fine locally (tried removing node_modules and running npm ci to reinstall it, no errors) $ npm ci np

'require.context' is not returning file names

I am working on a NextJS app and have created a few functions that facilitate a user uploading files. Files uploaded by the user will live in the "../public/upl

React Components Rendering Error in Electron-React-Boilerplate

Good Afternoon all, I built a React.js web music-player application a while ago, and now I am transforming my old react application into a downloadable des

Cannot post multiple and long requst Axios

I need to send post request to Another API, which will return result about 7 seconds. If I try to send post one by one, it's working great. But as soon as I loo

Using 3rd party lib file in NodeJs and getting LNK2001 error

I have been searching for an answer for a while and couldn't find anything that worked. Here is some background: I am trying to build an electron app that can u

Retrieve two foreign keys nodejs sequelize

I have a route and I want it to send two primary keys as foreign keys to my orderline table. I have three tables a customer, address and orderline table. an ord

Receiving error message about syntax nodejs

I am new to Node js. I am following this tutorial online. I was trying to test the code but I get an error every time about line 1 syntax error and I got the co

Firebase: Cloud Functions + Storage Read File

I am currently writing a function in Firebase Functions to be called within my Firebase mobile application. I have the code to call the function, but I do not k

upgraded depricated uuid pacakge in Window

npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be pro

I want to find the last object which i'm posting in my database without any condition but i can't find any method for that

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

Can't run a TS node + ES app - either get `ERR_UNKNOWN_FILE_EXTENSION ` or `new ERR_MODULE_NOT_FOUND`

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 mongooose package

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

How to use nock in order to mock Firebase/Firestore in NodeJS?

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

gm imagemagick passing in convert arguments as a string

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

Version of Node.js which not supperted by hardhat, but I have LTS version of node

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

Node and Crypto: this[D].init is not a function?

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[

Why does my Selenium script work only every other time?

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

Cannot understand difference between the two ip addresses in relation to hosting?

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

Sequelize transaction with optimistic locking is locking the whole db

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

Express.js backend not saving cookie to Nuxt.js frontend

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.