Questions tagged [node.js]

Node.js is an event-based, non-blocking, asynchronous I/O runtime that uses Google's V8 JavaScript engine and libuv library. It is used for developing applications that make heavy use of the ability to run JavaScript both on the client, as well as on server side and therefore benefit from the re-usability of code and the lack of context switching.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
6 views

Storing workflow data as artifacts - Node.js

I am learning Github Actions/Workflow/Pipelines etc. and now I want to upload an artifact. The problem is that I don't know what path for upload should I use. Is there any site or documentation for ...
user avatar
0 votes
0 answers
9 views

Pgadmin query result vs application query result has added text

I have nearly a thousand features in a table in my database that I want to query and aggregate as a single feature collection in a geojson file which I'm successfully doing using the following query: ...
user avatar
0 votes
0 answers
7 views

Nodejs Redis PubSub receivin duplicated messages

I've having duplicated messages from Redis PubSub and still can't figure it out what's going on. Here's my code: I have a Redis client connection pool using a Singleton. It means that I have a ...
user avatar
0 votes
0 answers
8 views

Mongodb mongoose project only matching object element from array in document

Here is a document in my Meetings collection { "_id": "1", "meetings": [ { "id": "00d505a2-5618-4ab1-aa31-7648fd93d41a", "...
user avatar
  • 3,656
0 votes
0 answers
10 views

Get db docs with a certain value

I am trying to get all of the posts that are listed under a group (essentially the topic of a post). Each post document has a field called group_id, which contains the id of the groups document. When ...
user avatar
1 vote
0 answers
14 views

Facing issue to make SEO friendly app in React

I have React app that is coded in the following tech stack React JS Node JS with Express Mongo DB https://xpera.de/ As it React so I am facing an issue to make it SEO friendly. I already tried many ...
user avatar
0 votes
1 answer
28 views

How to insert data in array in react js?

I'm using react.js and I have class base component. Now the scenario is. I have one array with the name of partitions. partitions=["P1","P2","P3"] and I have another ...
user avatar
-2 votes
1 answer
18 views

Two part question with npm install and what it does [closed]

If team developer A installs a package: npm install a-cool-package And then pushes his/her code to the repo. Developer B does a git pull to get the updated package.json and package-lock.json and any ...
user avatar
  • 495
0 votes
0 answers
9 views

GraphQL Subscription Mongoose ID Issue

Graphql subscription returns null id for mongoose: Here is my mongoose schema: "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.logreocrdSchema =...
user avatar
  • 13
0 votes
0 answers
8 views

How to seed database with mongoose (MongoDB) and nextjs

Could you please assist me with seeding the database in nextjs? This is the main code of seeder.js import Product from '/models/productModel'; import products from '/data/products'; import dbConnect ...
user avatar
  • 1
0 votes
0 answers
14 views

Would this be good solution to providing Image sources in React Native?

So in javascript, you cant use dynamic variables as a part of the path for require() right?. Well i have a bunch of images that are displayed dynamically/conditionally based on user actions so I can't ...
user avatar
  • 157
0 votes
0 answers
19 views

How can I alias a path in package.json to sub paths in my src directory?

I have the following in my JS app: packages ├── linters │   ├── node_modules │   ├── package.json │   └── src │   ├── baseEslintrc.js │   ├── index.js │   ├── nodeEslintrc.js │   └── ...
user avatar
  • 7,225
0 votes
0 answers
19 views

Are there any reserved NPM package names?

I tried to publish 2 packages to NPM with the substring "download" in the package names. Both times I get the http 400 error during the publishing process, no further explanation given. The ...
user avatar
  • 1,482
0 votes
0 answers
18 views

Record an older version of variable data

I have a question about a crypto trading signals bot I'm making. The asset price and RSI indicator are being updated every 16 seconds, and the program runs the tweetBuy function when the RSI is below ...
user avatar
  • 3
0 votes
0 answers
21 views

convert pine script codes to javascript

help me convert pine editor codes to javadscript I want to write this code in javascript I can write it in pine editor but I couldn't find how to use it in my node js based project. I will be glad if ...
user avatar
0 votes
1 answer
12 views

How to display [Object] in Telegram bot Nodejs

[in Telegram bot it only shows The current price of object object await bot.sendMessage(chat_id, The current price of ${_coinList}.);
user avatar
  • 1
-1 votes
0 answers
9 views

Is it worth using deathbycaptcha service?

I'm using Pupeeteer to automate some task on a website but there's Google's image captcha problem it appears after sometime. I tried many things but can't solve this problem. Tried using chrome ...
user avatar
0 votes
0 answers
11 views

Is it possible to call a python file from javascript with firebase?

I'd like to pass data between a javascript file and a Python file on firebase, is it possible or not at all ? When I do it locally it seams to work, by locally i mean type node script.js in the ...
user avatar
0 votes
0 answers
5 views

Nodejs Sequelize instance timeout when connecting to mysql container

I have a Node.js server running on an Ubuntu-20.04 Virtual Machine. I'm using docker compose to setup a mysql container with a production database. My docker-compose.yml file is like so, prod_db: ...
user avatar
0 votes
0 answers
22 views

TypeError: Cannot create property '_id' on string while inserting from stream into mongodb

I'm using node 18.7 on ubuntu. I'm trying to parse a bunch of csv files to objects and load into mongo db. I'm trying to follow https://github.com/AbdullahAli/node-stream-to-mongo-db example 4 - ...
user avatar
  • 30.8k
1 vote
0 answers
15 views

Clean Architecture: how to properly authenticate users

I am making a project using Express and Nodejs. I am learning how to implement learning how to implement clean Architecture properly. I've made so far a Entity whose is a Balance (income/outcome). But,...
user avatar
  • 428
0 votes
0 answers
13 views

How to connect a Node.js server to React Native?

I am creating a React Native app that needs a backend, and I only want to create a backend in Node.js (express.js). How should I host/deploy this server so that it can interact with a React Native app?...
user avatar
0 votes
0 answers
12 views

How to define MongoDB Schema for Typicode Posts and Users?

Hello I want to seed data from https://jsonplaceholder.typicode.com/posts and https://jsonplaceholder.typicode.com/users I defined the mongodb schema for User like const mongoose = require("...
user avatar
0 votes
0 answers
35 views

Why is there a delay between an async function returning and its caller actually receiving the returned value?

I was analyzing the performance of one of the controller functions of my express app and noticed something strange: there's a significant delay between when an inner async function returns and when ...
user avatar
  • 9
0 votes
0 answers
12 views

As soon as I increase the limit from the psql DB, axios fails. Why?

I have a function that reaches out into the DB, gets a record and verifies it. The verification process happens with an API via Axios. (See code at the end). The limit of records requested from the DB ...
user avatar
  • 121
0 votes
0 answers
14 views

getting error while uploading image to mongodb

When I am saving only image buffer to database its getting saved and not saving other data , but when I save other data with image buffer I am getting error . when I am saving data and image buffer ...
user avatar
  • 29
0 votes
0 answers
10 views

Write excel file to file stream with nodejs and download it with api call in browser

I am stuck at problem on how to write excel file to filestream and download it in browser.. I can only create new file in server but this is not what I want.. I don't want to create in on server (ok ...
user avatar
  • 185
0 votes
0 answers
21 views

Firebase functions: getting document data inside a function

im making a type of chat app. Im trying to write a firestore function that listens to a specific document that, when updated, will trigger the function to send a push notification to a specific user. ...
user avatar
0 votes
0 answers
17 views

Axios request returns 503 status code on request

hello i have issues with axios returning 503 server error in deployment. when i test this on my computer and with postman works fine but when script uploaded to linux server it returns 503 server ...
user avatar
0 votes
0 answers
21 views

Node/JavaScript: Read in Directory of File Paths & Write Out To File in Specific Order

I'm reading in a directory of file paths, and I want to write those file paths back out to another file, but in a specific order. Here's how I'm reading in the directory and writing it out: const path ...
user avatar
0 votes
0 answers
6 views

Dynamically unregister callback action middlewares on Telegraf without using Scenes/Wizards?

I'm currently creating a Telegram chatbot which allows sending callback buttons on messages with dynamic content using Node.js and Telegraf. As shown in Telegraf callback_query, I should definitely ...
user avatar
  • 149
0 votes
0 answers
22 views

Undefined variable in ejs template with express

I am using ejs template engine in my express app with conditional rendering in title tag //layout.ejs <!DOCTYPE html> <html> <head> <title><%= pageTitle ? ...
user avatar
0 votes
0 answers
17 views

RegExp: Grabbing value in between the triple backticks which are at the start and at the end [duplicate]

Take a look at the list below. List of Strings: compile ```js\ncode\n``` // -> code compile ```\ncode\n``` // -> code compile ```js code\n``` // -> code compile ```\ncode``` // -> code ...
user avatar
0 votes
0 answers
19 views

Unable to fetch data using a simple Rest API

I created a simple Rest API using Expressjs, Prisma, SQL Server, and Docker-compose. Here is the article that I'm following. I'm trying to fetch data using that API but getting the following errors: ...
user avatar
  • 3,800
0 votes
0 answers
26 views

What did I do wrong in the TypeOrm config in my node.js app? (Cannot find module error)

I have a nestjs application, that I wrote in typescript and I use TypeOrm and MySQL Workbench database. I guess I did something wrong in the TypeOrm config, as it can't find my entity. A got an error ...
user avatar
  • 11
0 votes
0 answers
5 views

JIMP Issues with saving within /tmp in AWS Lambda function

I have written a Lambda function which opens an image and modifies it, before saving it to the /tmp folder and uploading it to an S3 bucket. This works locally, but when I run in in Lambda I get an ...
user avatar
-2 votes
0 answers
10 views

Accessing a single value from a nested JSON javascript [duplicate]

Trying to read only a single field from a nested json format. I'm trying to read and output to console.log only the id part from the nested payment array. I've tried const body = { "message": "...
user avatar
0 votes
1 answer
22 views

mongodb error Path description is required

Before asking my question I have consulted the various posts on this subject but I still can't find a solution. I create a corporate social network as part of a training, I use NodeJs, Express, ...
user avatar
0 votes
0 answers
21 views

Using Both Express.js and Http module in NodeJS application

Currently, I am developing a simple project, which uses strong-soap module and expressjs. To create a soap server, I have to use http module of NodeJs, using express for soap module causes errors (...
user avatar
0 votes
1 answer
13 views

Duplicate key error while using mongodb with nextauth

Here is the error that I get whenever someone logs in. I don't know why this is happening honestly. 2022-08-08T17:54:41.752185+00:00 app[web.1]: message: 'E11000 duplicate key error collection: ...
user avatar
  • 94
0 votes
0 answers
7 views

Amazon S3 Bucket Policy Issue with Nodejs multer-s3

I've created an api to upload image to amazon s3 bucket with nodejs, multer, and multer-s3 . Its working fine in development returning me a response of image URL which is downloadable and accessible ...
user avatar
0 votes
0 answers
28 views

Why does user name is not displaying using socket.io

I am Creating a Whatsapp Clone, and the thing which is main here is Socket.io correct usage I will tell you what the problem is, but first let me show you my html, css and javascript files. And then ...
user avatar
0 votes
0 answers
14 views

Automate Nodejs script to take input file after some interval from a folder?

I have a Nodejs script which is currently taking image file and sent it to server via API, Now I am wondering if there is any method through which Nodejs scripts runs every small interval and check if ...
user avatar
  • 244
-1 votes
0 answers
19 views

how to do test on .catch() block in jest?

I need to create test that make sure customer.js send a error response, I wrote a 3 test cases for another return, but I have no idea how to write test case for .catch() block I'm using express mysql2 ...
user avatar
0 votes
0 answers
29 views

How to run nodejs with es6 syntax

I am trying to run node.js project. I added "type":"module" in my package.json, it worked for import syntax. Next, I initialised my app with .babelrc. It seems to work but, I am ...
user avatar
0 votes
0 answers
16 views

Can't fetch data from node backend to react in production

the data from this endpoint can be fetched in development, but returns null in production app.get("/api/dashboard", (req, res) => { database .collection("storeItems&...
user avatar
0 votes
0 answers
25 views

Error: Jest: Got error running globalSetup - /home/pptruser/app/node_modules/jest-environment-puppeteer/setup.js

When running from local, its getting passed. Below error is thrown when run from docker locally. I am in the process of setting up my code for my puppeteer test. I also included here below package....
user avatar
-1 votes
0 answers
10 views

I'm just trying to register a user and I got this Error : App\Entity\Property object not found by the @ParamConverter annotation

I checked others answers about this problem, but I still can't find out the solution. Do you have any ideas? This is my Property Controller class PropertyController extends AbstractController { ...
user avatar
0 votes
0 answers
10 views

Do I need to serialize and deserialize user with JWT/Cookies?

I am having some trouble trying to implement my oAuth login with PassportJS with a jwt instead of a session. I am trying to use a jwt token and send it as a response in a token everytime a user logins ...
user avatar
  • 5
0 votes
0 answers
3 views

Having issues creating associations for create sequelize queries

I am having issues creating associations in my code on sequelize 6. I will try to be as clear as I can but since its a very large project for my company i cant share all the code. but basically here ...
user avatar

1
2 3 4 5
8771