All Questions
Tagged with node.js javascript
177,562
questions
0
votes
1
answer
19
views
Error on imports when trying to use SHACL with Playwright
I am trying to do some API testing in Playwright with SHACL, and the imports
import { test, expect } from '@playwright/test';
import rdf from 'rdf-ext';
import N3Parser from '@rdfjs/parser-n3';
import ...
0
votes
2
answers
39
views
Error when trying to upload an image prompt to gemini api
I am using Postman and trying to get a response from Gemini API when trying to make a prompt including an image.
I am sending the requesto to: https://generativelanguage.googleapis.com/v1beta/models/...
-4
votes
0
answers
47
views
API items shown unordered in JavaScript [duplicate]
I'm making one of my first React projects and I'm using a Harry Potter API (https://potterapi-fedeperin.vercel.app/es/characters?) to show the characters. Each character has an index attribute ...
0
votes
0
answers
13
views
okio: can't sync file with JS in kotlin multiplatform
I have following code in KMP:
val fileSystem: FileSystem = NodeJsFileSystem
val path = "photo".toPath()
fileSystem.sink(path).close()
In browser I see in logs smth like:
Exception ...
0
votes
0
answers
18
views
How can i optimize my checkForConsistency function?
I have been given a task to optimize a function. I have done the following things to enhance the code like
Saving state of processedIds in case of failure and continuing from there
Fetching necessary ...
0
votes
0
answers
25
views
ts-node-dev doesn't support ts requires in js
I'm trying to import ts. files inside a .js file (reason is that I don't have time to fully migrate my project to typescript)
I figured out a way like that :
I have my routes.ts that I want to import ...
0
votes
0
answers
13
views
Fonts Not Rendering for Non-English Text in Node.js Video Rendering on Ubuntu EC2 Server
I'm working on a Node.js project that renders videos with text in multiple languages and fonts using the node-html-to-image library. Everything works perfectly on my local Windows machine, but when I ...
0
votes
0
answers
54
views
+50
Writing/Reading to the same file when increasing pm2 replicas
I have a bull queue implemented in Redis, which accepts data in this format
{
sessionID : '43i43ko4'
events : [{...}]
}
This data are being sent as queue and then I process them in consumer.js. ...
2
votes
1
answer
25
views
Backend JavaScript file EmailJS send error
I'm trying to make a route for my backend javascript express server server.js which will send an email using EmailJS to my gmail account when called.
If I try this code:
const SMTPClient = require(&...
0
votes
0
answers
14
views
Cannot resolve "express" in nx nestjs monorepo
I'm working on an Nx monorepo with a NestJS project, and I'm encountering an issue where it cannot resolve the "express" module. Here is my package.json:
{
"dependencies": {
&...
0
votes
1
answer
29
views
npm is not working!! Why this error occur when i type "npm -v" or any other of npm
type = npm -v
then
node:internal/modules/cjs/loader:1148
throw err;
^
Error: Cannot find module '../../package.json'
Require stack:
C:\Users\App\AppData\Roaming\npm\node_modules\npm\lib\cli\validate-...
0
votes
2
answers
64
views
NodeJS Async function called once only in a loop
Following is my code structure. I have two async functions from source.js and db.js. I'm exporting these functions and calling them in test.js.
test.js calls the function async loadFromFile() to read ...
3
votes
1
answer
47
views
Javascript - Express.js - send regularly status responses to the client
i want to implement a logic where my express backend regularly sends updates to the client on how far a process reached at the moment.
For this i've created an example backend:
import express from '...
1
vote
1
answer
39
views
TypeError: $.extract is not a function
It seems like many of the cheerio functions are unavailable. I have been able to use filter() and find(), but not extract. Even when following the exact tutorial.
npm install cheerio
import * as ...
0
votes
0
answers
16
views
Nodejs Websocket Connect by wss
We hired a vps with Ubuntu and installed nodejs for a chat server, and it will be consumed by external websocket connections from other domains outside this vps. Let's encrypt certificate installed by ...