473,857
questions
0
votes
1
answer
25
views
Node.js not installed properly
After installation a pop up message appears just before the last step of installation it is showing installation was interrupted enter image description here
I want to install node.js in my system ...
0
votes
0
answers
11
views
SequelizeConnectionAcquireTimeoutError: Best Practices for Using Sequelize ORM in Node.js Application
I’m using Sequelize ORM in my Node.js application, and I’m encountering an issue where I sometimes get a SequelizeConnectionAcquireTimeoutError. I’d like to get feedback on whether my approach is ...
-1
votes
1
answer
31
views
"TypeError: command.resolveMiddleware is not a function" with DynamoDBDocumentClient and UpdateCommand
I'm running the following code in a lambda, and I'm receiving the following error
{
"errorType": "TypeError",
"errorMessage": "command.resolveMiddleware is ...
-1
votes
0
answers
18
views
async get has strange problem with downloading file from discord channel. discord js
I'm making the bot to download the file from message but strange error happens
const get = require("async-get-file");
if(message.attachments.first()){
message....
0
votes
3
answers
55
views
Request with express hangs
I have the following code:
export default class Server {
private app: Express;
public port: number = 3000;
constructor() {
if (!isNode) {
throw new Error("The server must be ...
-1
votes
1
answer
24
views
Discord JS v14 Bot Script Not Working (Specifically, GuildCreate and GuildMemberAdd not triggering)
Okay. I've tried everything I can think of here, and I can't seem to find anything that is a similar problem to mine. The closest thing might be this post.
I'm trying to build a Discord bot that can ...
0
votes
1
answer
40
views
NestJS Mongoose Connection Error: "MongooseServerSelectionError: connect ECONNREFUSED ::1:27017" [duplicate]
I'm working on a NestJS application that connects to a MongoDB database using the Mongoose module. Everything was working fine until I encountered the following error:
[Nest] 3372 - 08/24/2024, 9:32:...
-3
votes
1
answer
31
views
I get a 'Cannot GET' error in express project [closed]
Getting cannot GET error while trying to access a url
I was making a simple node.js express project and doing login and register urls, but I can't access them
This is my routes/users.js file:
const ...
0
votes
1
answer
32
views
Mongoose Validation Error on lastUpdated Field Despite Setting It Before Save
I'm running into a bit of an issue with Mongoose in my Node.js/Express application, and I would greatly appreciate your help. The problem occurs when I try to update a Restaurant document in MongoDB. ...
0
votes
0
answers
59
views
Dynamically created Function is not calling or returning
I'm trying to dynamically create a Function in javaScript. Here is my code:
class Server {
// Omitted for brevity
public async method(method: Function, args: any[]) {
const fsp = await ...
0
votes
0
answers
31
views
Upload .tar.gz to s3 bucket using presigned url with node.js
I am facing an issue uploading a .tar.gz file to an s3 bucket using a presinged URL.
If I upload any other file then it works without any error but with .tar.gz it does not give any error and does not ...
0
votes
0
answers
12
views
PrismaAdapter can't build
My code working in "npm run dev" mode, but when I want to build my project I take this error:
./node_modules/next-auth/src/core/lib/assert.ts:134:27
Type error: Element implicitly has an '...
0
votes
0
answers
55
views
Incompatibility node driver requirements and mongoDB maximum wire version
I am updating my ancient node application to the latest npm packages, and things are moving. The heart of my application is a link to a mongoDB instance, which holds everything together. And now I am ...
-3
votes
0
answers
44
views
how to import "mongoose" library into html [closed]
me want to import a mongoose library to my website(into html code), but I cant`t do this. I tryed import a 'mongoose/index.js' file, but I was only able to import this file and not the entire library. ...
0
votes
0
answers
18
views
How to implement pagination for the app similar to reddit
I have been developing something similar to reddit but have been stuck on pagination of comments for more than a week.
I have the following model for comment:
model Comment {
id String ...
-2
votes
1
answer
48
views
How to fetch data from my mongodb database to my frontend [closed]
Please, I'm a beginner and I'm trying to run a blog site using Node... I've been trying to write a code to fetch data from my MongoDB database to my frontend using nodejs, express, ejs and mongoose ...
-3
votes
0
answers
27
views
why the import file from different path in VScode? [closed]
this is package.json config.
{
"name": "vue-test",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"dev"...
1
vote
0
answers
26
views
livesmart server video php file not working on local
I have windows 10. I am using Laragon having Apache, php, mysql etc. I have Node js, npm, maria DB etc installed as well. I am trying to setup “livesmart server video” from https://codecanyon.net/item/...
0
votes
1
answer
49
views
How Scope works in Nest js
As per docs if a service is a request scope then the controller depends on it and will be request scope automatically.
Imagine the following dependency graph: CatsController <- CatsService <- ...
1
vote
0
answers
11
views
node-tree-sitter always outputs error despite CLI working
I'm trying to use tree-sitter to parse my little test language.
Here's the code:
#!node
const Parser = require('tree-sitter');
const Kram = require('.');
const parser = new Parser();
parser....
0
votes
1
answer
84
views
'pg' package TypeError: Cannot read properties of undefined (reading 'then')
When I try to run then function on it, it will return this error
TypeError: Cannot read properties of undefined (reading 'then')
at Object.\<anonymous\> (/app/src/index.js:52:2)
at Module.\...
0
votes
0
answers
26
views
How is node v20's File class intended to be used?
Node v20 officially took the File class out of experimental, but I'm not entirely sure how it was intended to be used.
There doesn't seem to be any exports in the "fs" module that create ...
0
votes
0
answers
42
views
CORS issue when connecting frontend and backend on different domains in production (Hostinger) without VPS
I'm staring to get involve in Software development. I’m working on deploying a web application where the frontend and backend are hosted on different domains. I’m using shared hosting on Hostinger and ...
-1
votes
0
answers
25
views
NodeJs server becoming unresponsive [closed]
I'm running a Node.js server using PM2 in cluster mode on a machine with 8 cores. Occasionally, the application becomes completely unresponsive—no logs, no responses, nothing.
I've integrated ...
0
votes
0
answers
41
views
+50
Typescript composite project with NextJS
I have reorganized my project in NodeJS/Typescript using workspaces and project references. One of the workspaces (sub-project) is a NextJS application, and the recommended tsconfig.json includes the ...
-1
votes
2
answers
43
views
How to share data between concurrently executed promises in NodeJS
I want to share data between the two concurrent method calls shown below.
async generateSuggestedSparks(userId: GraphID, friends: Person[], latLng: LatLng) {
let suggestions = await this....
0
votes
0
answers
25
views
Kafkajs `consumer.disconnect()` not resolving
i currently start experimenting with KafkaJS with the following use-case:
I want to retrieve all messages within a given timerange.
So i build a server action which creates a kafka consumer, ...
0
votes
0
answers
16
views
node js $strLenCP requires a string argument, found: missing',
router.get("/find", async function (req, res) {
// var regex = new RegExp("react", "i");
var date1 = new Date("2024-08-22");
var date2 = new Date("...
0
votes
0
answers
8
views
Node Guardian - run Start Adventure gives NPM dependency error
I am trying to setup Node Guardians. Prerequisites on Tutorial says Node version 18 or later. When run "npm run start adventure", I get a series of "Conflicting Peer Dependency" ...
1
vote
1
answer
67
views
How to run logic the first time a route is accessed in Express.js?
I'm using Express.js, and I want to initialize a cache on every initial request to a route, and on the subsequent ones use the cached value.
For now, I do something like this:
let hasRun = false;
app....
0
votes
1
answer
46
views
How to simplify this DEV script for faster running Express with GraphQL with Prisma
"dev": "export NODE_ENV='development' && DEBUG=*,-babel-watch:*,-babel,-babel:*,-express:*,-nodemon,-prisma:*,-prisma:client:*,-body-parser:json,-nodemon:*,-babel-watch:*,-...
0
votes
1
answer
37
views
Why won’t TypeScript let me import a type from an ES module into a CommonJS module?
I’m writing a Node.js app in TypeScript. Here’s a simplified version of my files so far:
// package.json
{ "type": "module" }
// tsconfig.json
{
"compilerOptions": {
...
1
vote
2
answers
35
views
Swagger OpenAPI issue with bundling up files
I am using swagger-cli to bundle my openapi.yaml file that has refs to other .yaml files in sub dirs. The api documentation when I spin up the server works without any issues and displays all the ...
0
votes
0
answers
16
views
Nodemailer queryA ETIMEOUT with AWS SES
So I am confused as my code works; as it does send about 100+ emails before it produces the following error:
Error: queryA ETIMEOUT email-smtp.us-east-1.amazonaws.com
at QueryReqWrap.onresolve [as ...
0
votes
0
answers
46
views
Use data posted to a Google Cloud Run Function
Goal: When a cell is edited in a Google Sheet, send the row to a Node.js Google Cloud Run Function to be processed as a variable in the code.
In my apps script on the Google Sheet, I can successfully ...
0
votes
0
answers
46
views
What settings I can use for Llama 3.1 to get the right answer?
I have Llama 3.1 8b running locally and if I ask a question LM Studio the answer is the right but if I try do it in my node app I having it wrong?
If documentation is required as part of an Increment, ...
0
votes
0
answers
31
views
AWS Device Farm NodeJS Appium unable to run due to APK error
I'm trying to set up AWS device farm and Appium to run a simple set of tests for a react native project.
Everything works fine locally but I'm having real problems getting it set up on AWS.
There ...
-1
votes
0
answers
24
views
Problem with returning Django-Rest Framework Server errors on a React-Designed page
I am working on a project where the backend is implemented with the Django Rest Framework and the frontend is coded using React. For the user login page, I want to display the exact error message ...
0
votes
1
answer
38
views
Mongoose Plugin to filter soft deleted in array docs and root docs using find() and perform soft delete on array docs and root docs [closed]
Implementing a Mongoose Plugin for Soft Delete Array docs and root docs and Filtering soft deleted Array docs and root docs.
I am developing a Mongoose plugin to handle soft deletion and filtering of ...
-3
votes
0
answers
12
views
i have problem to deploy the contract which said sapoliya test network not exist and also node js version not support hardhat
WARNING: You are currently using Node.js v21.7.0, which is not supported by Hardhat. This can lead to unexpected behavior. See https://hardhat.org/nodejs-versions
Error HH100: Network sepolia doesn't ...
0
votes
0
answers
47
views
how to instantiate a new Sharp.js object for each path to GeoTIFF file
for the code posted below, in the code in the section titled code_1, I invoke the method subtractGeoTIFFs(). The first two parameters passed to the latter method, contain two
paths to two different ...
-1
votes
0
answers
16
views
Verifying digital signature in nodejs from pendrive
I have pendrive in that there is software GUI ProxKey Token like which is used to show my certificates and export .cer file i have already extracted my .sign and .pem files to verify digital signature ...
0
votes
0
answers
11
views
How can I set bodylimit according to mutations in graphql & redwood & fastify?
I am trying to set the bodylimit according to the mutations in Redwoodjs. I want to set different bodyLimit due to different file sizes.
I tried to use @fastify/multipart with graphql in server.ts but ...
0
votes
0
answers
121
views
+50
Node.js fetch with ProxyAgent from undici never gets response (axios works)
I want in a Node.js project to perform a simple fetch request with proxy by specifically using ProxyAgent from undici and native fetch but i can't get it to work. The request never resolves or rejects ...
0
votes
0
answers
32
views
Unable to add id in URL request through req params
I want to retrieve product by id from server in mongoose but req.params.id is not working.
I replaced req.params.id with id number to see if there is any other problem but it worked fine.
Here is the ...
0
votes
1
answer
27
views
I get Error TypeError: Cannot read properties of undefined (reading 'key')
I'm experiencing a couple of issues with configuring and using OpenAI in a Firebase function.
When trying to access the OpenAI API key in the openaiConfig.ts file, I get the error:
TypeError: Cannot ...
0
votes
1
answer
23
views
Elastic-builder for R shiny
I am trying to source Elastic-builder library in R shiny using this cdn link: "https://cdn.jsdelivr.net/npm/[email protected]/src/index.js". But this is not sourcing the library as ...
-1
votes
0
answers
33
views
issue with nodejs SyntaxError: Unexpected token < in JSON at position 0 [duplicate]
I got 2 files, app.js and bot.js. App.js is supposed to receive data off stripe which successfully does so and send that data to bot.js which does receive it.
Issue I'm having is SyntaxError: ...
1
vote
0
answers
41
views
Source Maps Not Correctly Mapping Stack Trace in Sentry for Node js
I'm trying to trace where errors occur in my code using Sentry. To achieve this, I'm uploading source maps to Sentry during the build stage in CodeBuild. In the post_build phase, I use these commands:
...
-2
votes
0
answers
29
views
I am trying to sanitize object but still getting error snyk.io in | NODE.js [closed]
I have 2 types of error in snyk report https://snyk.io/ I don't know if it can be solved with Deepcode AI as well but appreciate the answers.
SQL injection: unsanitize input from an HTTP parameter ...