Category "node.js"

How can I solve a "MongoError: E11000 duplicate key error collection" error in Mongo?

I have created a new Mongo collection to a new project, but when I try to create a new user, I get the following error: MongoError: E11000 duplicate key error c

'The "path" argument must be of type string. Received null' in electron-json-storage

I'm using eletron-json-storage like this: settings.js: const storage = require('electron-json-storage'); const defaultStoragePath = storage.getDefaultDataP

Unable to resolve npm install pre-gyp error

I am trying to install this app locally on my m1 MacBook air > Github - Todoist Clone Running npm install in the terminal is causing the following error, ple

Installing different Node version in wsl 2

I am trying to update my Nodejs to the latest version in WSL 2. My old version is v15.0.0 and is installed at active : v15.0.0 at /home/sathish/.nvm/versions/no

How to make React search component

I am doing my first Ecommerce MERN stack project but i donot know how to make search component that will take the search input and return array of matching prod

Discord Music Bot Wont Boot

So Im making a discord music bot (not for public) and its based off some github code and I put it in and gives me this, I had the node:events problem and fixed

Mapping a Subdomain to a NodeJS web server running in a docker container with a specific port?

I have a server running Pterodactyl panel which uses Docker. I'm using a Nodemon js egg to run a Node JS webserver I developed. The server uses 5500 as the port

Two classes on single react HTML element

I feel like there is a simple answer here, but I'm not finding it - In my react header I import my stylesheet under 'styles' and as such refers to css classes a

How to extract all datas from xml DOM in node JS

I am going to extract all attributes and texts from xml DOM in express Now I am using xml-query node module <?xml version="1.0"?> <OrderMessage

I have node.js c ++, java, python compiler. in some cases it returns node.js error without any compiler error

I have node.js c ++, java, python compiler. in some cases it returns node.js error without any compiler error: enter image description here enter image descript

unable to change timezone

I'm trying to change the timezone of my container into "Europe/paris", I saw I had to set TZ environment variable so I did this, but it doesn't change the timez

app.post('\pageNameOrCanBeAnyRandomName')?

I have a page called createEmployee.js which includes 2 functions (fetchData and createNewEmployee) ... see below: const fetchData = async() => { c

`puppeteer-page-proxy` with `https` has Error: net::ERR_FAILED or RFC 6066 error

I use puppeteer and puppeteer-page-proxy proxy. I don't have problem with use args: ['--proxy-server=socks5://127.0.0.1:9150',... with either http and https. I

How to get a value out of a callback function in javascript [duplicate]

var request = require('request'); var d; request('my.servers.ip?group=1', function (error, response, body) { let d = body }) console.l

How to run npm start without opening browser for react development on linux

I am learning react and find myself running npm start on the terminal a couple of times but its annoying how it opens a new browser window everytime. I'm tryin

Dynamic Server Side Rendering (SSR) and Client Side Rendering (CSR) in angular depending who requested

Is It posible to create a Node.js service that renders the angular aplication depending in if is a client or a server? Right now I am only using SSR, I followed

NestJS/TypeORM: Cannot set property metadata of #<Repository> which has only a getter

I try to run my nestjstutorial app, the below error is showing. My backend is connected to a PostgreSQL db. TypeError: Cannot set property metadata of # which

facing problems in installing tensorflow

I am facing problem in instaling tensorflow, please help me. Here is the error that I get: ^3.1 npm ERR! code 1 npm ERR! path C:\Users\dell\node_modules\@tensor

how to sum 2 numbers in javascript before saving it in mongodb database

I'm building a web app using MERN stack. I want to sum 2 numbers then save it mongodb database. Here current num is from database and other is from input field

facing problems in installing tensorflow

I am facing problem in instaling tensorflow, please help me. Here is the error that I get: ^3.1 npm ERR! code 1 npm ERR! path C:\Users\dell\node_modules\@tensor