Category "node.js"

Node/JS mongoose REST API How to push a new object into a nested array of objects all in one collection

Noob MERN Stack Dev here, I am building a little food delivery practice web app. I have begun creating a basic RESTful API to serve my food delivery site. I am

Is there a way to get the mouse position within the terminal?

I am currently coding a node.js program relating to mouse coordinates. Is there a way to see the mouse position in the terminal in Node.JS? I've tried the ways

Socket.io is working on localhost but not working after deploying heroku?

Here is the code of my socket server const io = require("socket.io")(8080, { cors: { // origin: "http://localhost:3000", origin: "https://mern-bubble.he

React-scripts test: no traceback on exception

I remake browser version of TacticToy game with React, and during unit-tests writing I've got a problem: there is no full traceback of a custom exception, only

beforeBulkDestroy not finding model property to change

I am trying to use the beforeBulkDestory Sequelize hook on a user delete that will switch the deleted column boolean to true prior to updating the record to add

Passing all datas to the URL isn't the way to go, I think

I recently started to use NodeJS into my Angular program, so far, I'm doing it like this : node : app.get('/register/:username/:password', function(req, res){

vs code node version is older than node version on my system

I was programming with typescript, then this happened when i runned "tsc fileName.ts" "Accessors are only available when targeting ECMAScript 5 and higher." So

Firebaseapperror: failed to parse private key: error: invalid pem formatted message

I got this error firebaseapperror: failed to parse private key: error: invalid pem formatted message when I pushed my nodejs app to heroku. I had my environment

Next JS: getServerSideProps cant get cookie [duplicate]

I want to return two cookies, but only one is returned only token cookie, while key cookie cannot be used export async function getServerSideP

Discord.client is not a constructor - discord.js

i made a discord bot and tried a beginner code i found on youtube, this is my code and my errors index.js // Require the necessary discord.js classes const Disc

Why doesn't load data into my collection? mongodb

This is what appears on my mongo database: This is my app.post to insert the data, when I Submit it console.log the object with the dates but with create It ju

Jest test a function integrated with the ssh2-sftp-client library

I need to test a function that write a file from local path to remote path on an sftp machine using shh2-sftp-client library. my own function is the following:

npm error | Error: Cannot find module '@emotion/styled'

I am having an issue running my Node project. This issue did not exist yesterday. I can't think of anything that has changed since other than an update my OS di

Cancel File Upload: Multer, MongoDB

I can't seem to find any up-to-date answers on how to cancel a file upload using Mongo, NodeJS & Angular. I've only come across some tuttorials on how to de

A simple function to query MSSQL then close the connection for use in quick scripts

I have a script that I want to be able to schedule to run periodically, and query a DB, open a connection, execute a query, then close the connection. Trying to

Getting : npm WARN using --force Recommended protections disabled

I have an old Nuxt.js package that was developed in Node 12 and I want to use it now with Node 16 (the latest stable) but when I try to install my packages by n

Mocha testing Typescript source file: unable to import node modules

I have setup mocha to test typescript source files. I have successfully run a test on one file that only imported source files, but I'm seeing a failure running

How to check if an element exists on the page in Playwright.js

I am using playwright.js to write a script for https://target.com, and on the page where you submit shipping information, it will provide the option to use a sa

npm ERR_SOCKET_TIMEOUT error while installing create-react-app

While attempting to install create-react-app I'm getting the below ERR_SOCKET_TIMEOUT error. Creating a new React app in E:\New folder\my-app. Installing packa

How to get Realtime Logs in Elastic beanstalk like Heroku

I am moving from Heroku to Elastic Beanstalk as advised by some team I am working with. Now, when I was with heroku I got the benefit of real time logs as reque