React app can run node.js function which preparing data and sending information to the database in batches. It takes a lot of time and I would like to add the ability to stop this function right from react app. I tried a lot of things to include in this function including: while loop: added the variable outsi…
Tag: node.js
Must use import to load ES Module .eslintrc.js
I am trying to fix this problem for hours. I’ve read nearly every post about this, but still, I came to no solution. I am trying to deploy a firebase-function with the “https got-library” dependency, but no matter what I do, nothing works. I am not the best with node-js or typescript (usuall…
Why am I still getting an error with a DELETE request in Postman?
I’m kinda new to programming and I am trying to send a delete request to Postman but I keep getting this error in postman. Would anyone know how to fix this? ERROR: NOW, the delete request is working properly as I can see the query selection being deleted when I send the delete request but I am still ge…
I’m trying to scrap data from a website and getting back basic HTML with JS function in the body
Hi everyone, I’m playing around with Node.js and cheerio package as part of my node.js learning and im trying to build a web scrapper that will get the title and the price of an item from a shopping site but when I try to console.log the html variable it returns a basic html structure with some Js funct…
TypeScript: undefined is not assignable to type ‘boolean | ConnectionOptions | undefined
I am working with the below code-block, I built it a couple of months ago in JavaScript, but las week I decided to start learning TypeScript. I cant seem to find how to properly defined the data types. Does any one have any hints or resources that can aid me to solve this issue? this is the exact error messag…
Having an issue when using load events on firefox and safari
Both firefox and safari refuses to execute load event when loaded from an external js file. It only works on google chrome. I can’t really understand the problem. in my html : in myFile.js : My html page is serverd by node.js (ejs page), myFile.js is recognized by the 3 browsers (Firefox, chrome & s…
How to import .jsx files to .js files in reactJS
I m using node.js for this and using react as frontend, Now how do I import app.jsx file to index.js file? index.js app.jsx now at last in app.jsx file I tried to import/require the React file but I get an error “require is not defined” also in console when importing app.jsx it says require is not…
Finding out number of occurence of a key in a nested JS object
I have a nested object like Now I want to get the level of the master parent object or basically how many times a parent object has been nested. In this case, I should be getting an output of 3. Answer You could also do it recursively like this:
Error when I use npm install with visual studio code
Hello I am working on a project where I have to build an API. With node.js, express, and Mongodb. When I install the dependencies of express or mongo db ( exemple :npm install express), I have a error. I work with my wifi, yesterday everything was working though. I don’t understand why I have this probl…
how to edit the response fields in node-soap
I have the following WSDL definition: and the following handler definition: Currently, when receiving the following request: it returns: But I want the response to look like: I have tried different approaches but none to seem to have effect on the response type. I feel like I am missing something in the WSDL …