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 the server side and therefore benefit from the re-usability of code and the lack of context switching.
node.js
326
questions
0
votes
0
answers
5
views
Issues with importing an installed library (Opensea API) with npx?
I am trying to run this Opensea get-events API example locally.
node -v
v18.20.4
npm list
└── (empty)
npx api install "@opensea/v2.0#45iy1ilxxofiw1"
── @api/[email protected] -> ./.api/...
-3
votes
0
answers
14
views
How to tell if I'm on localhost nodejs?
How do I tell if I'm in localhost when I'm using nodejs?
Is there some property I can use that will tell me the domain I'm on?
I want to do something like this:
var url = "remotedomain.com";
...
0
votes
0
answers
5
views
Error: spawn winEvents.exe ENOENT occurs in packaged electron app
Uncaught
Error: spawn C:\Users\user\Autoclicker\esdeath\out\snowflake-win32-x64\resources\app.asar\node_modules\lepikevents/src/win/winEvents.exe ENOENT
at ChildProcess._handle.onexit (node:...
-1
votes
1
answer
15
views
How to test a local nodejs server from another local web project
I had a nodejs server and I used web pages to test the API locally. But I've now separated the nodejs project and the web pages because it was too cumbersome. Typescript was having trouble running in ...
0
votes
0
answers
5
views
NextJS spams 'TypeError: result.pipeToNodeResponse is not a function' in error log
I have a NextJS site running in an Azure Web App. It spams this error message to the terminal every 3 seconds or so:
TypeError: result.pipeToNodeResponse is not a function
at Object....
0
votes
0
answers
9
views
Express session is not saving data
I am trying to store information on my req.session object upon login and at a later time access this to verify if a user is logged in for middleware
I am aware there are several similar questions but ...
0
votes
0
answers
10
views
Adding Node.js and VSCode extensions causes Package Conflict
I recently downloaded Node.js on my machine and set it up with all the default options. I also added ESLint, Nx Console, Playwright Test, Prettier, Jest Runner via Visual Studio Code extensions. After ...
0
votes
1
answer
18
views
sh 'npm install' cmd not working in jenkins pipeline. Note: jenkins is installed inside windows
I am writing a simple jenkins files to test, build and deploy angular application.
but my jenkins pipeline is failing at sh 'npm install'
Here is my jenkins pipeline script
pipeline {
agent any
...
0
votes
0
answers
22
views
EJS isn't being rendered
I'm making a rock, scissors, paper game on the backend of Node.js with express server, frontend.js client-side, index.ejs and main.css files. I firstly want to render a string line of the result of ...
1
vote
1
answer
11
views
No version matching "^11.0.0" found for specifier "remark-rehype" (but package exists)
I tried to install react-markdown using bun. But I get the following error:
$ bun i react-markdown
bun add v1.1.20 (ae194892)
error: No version matching &...
0
votes
0
answers
24
views
How to send a Bearer Token from front-end to back-end
My back-end is already working ,I tested it in Postman but I don't know how to get the Bearer Token,which is in front-end; I am using httpOnly and withCredentials.
NODE:
MiddleWare:
const jwt = ...
0
votes
0
answers
8
views
Playing audio node. play.ai
Based on the details from play.ai's docs, it should be easy to play base64 audio but I'm running into issues. I am using nuxtjs.
These are the docs
myWs.on('message', (message) => {
const event = ...
0
votes
0
answers
11
views
More verbose output of native module build phase during yarn install
My yarn install --frozen-lockfile --verbose is getting hung at what seems to be the native module/gyp build phase and I can't figure out why.
I've tried export npm_config_loglevel=verbose before ...
0
votes
0
answers
11
views
NodeJS WebRTC - RTCAudioSource - Expected a .byteLength of 480, not 2770
I'm trying to have my nodejs backend act as a peer that streams pcm audio to the browser via webrtc (https://github.com/WonderInventions/node-webrtc). (let's assume it's the only way to achieve what I ...
0
votes
0
answers
16
views
Serving static files directly in Google App Engine with express
I have a standard Google App Engine environment and am trying to serve some static files for my create-react-app frontend, but I'm not able to do so without copying over the client/build/ files into ...
0
votes
0
answers
9
views
Problem recovering image, local drive - VPS
I recently uploaded my API to a VPS, and I'm having trouble recovering the images that are being saved locally. Whenever I try to open the image URL, I get a 404 Not Found error.
I'm not saving the ...
0
votes
0
answers
18
views
Cannot find module 'index'\nRequire stack:\n- /var/runtime/index.mjs Error on AWS lambda
I am trying to invoke a lambda function on AWS but I am getting the error: "Error: Cannot find module 'index'\nRequire stack:\n- /var/runtime/index.mjs"
Folder structure:
enter image ...
0
votes
0
answers
7
views
How to create an API authorization with the latest IOS SST and AWS
I want to create an API with the new SST v3 aka ION SST.
Docs don't say much about auth-related things and I feel confused.
I have a separate Next.js app and now I want to create a backend ...
0
votes
0
answers
9
views
Extrange problem with URL command line parameters on Electron app
I have discovered that if you pass a URL parameter using the command line to an Electron app, it must be the last one. If this condition is not met then electron fails to load the application and ...
-2
votes
0
answers
11
views
Displaying host machine info with docker container
I have nextjs app and im using nodejs os to gather system info about totalram cpu etc. How i can make it work with docker cause if i run my app with docker compose on my app ui i see ram allocated to ...
0
votes
1
answer
12
views
aws ec2 nginx reverse proxy to nodejs allow cors not working
I tried a couple of examples:
/etc/nginx/conf.d/default.conf
server {
listen 80;
server_name ec2ip;
set $cors_origin "";
set $cors_cred "";
set $cors_header ...
0
votes
0
answers
25
views
Link from react-router-dom is not redirecting
Since the button is within a <Link /> Component it shoul redirect to the '/home' page but it is not, its not redirecting anywhere. the function PostLogin is being Called i have confirmed
<...
0
votes
0
answers
13
views
How can i generate the arrow function format typeorm migration file?
when ever i am generating migration file i am getting this kind of format
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "transaction&...
-3
votes
0
answers
26
views
Stripe Connect Payouts API [closed]
I am creating an application in which users can add their bank accounts in the application and from admin side I want to send the payouts to their bank accounts. I am using Node.js and Stripe.js (In ...
-1
votes
0
answers
15
views
req.headers.authorization is undefined
So I've been trying to implement JWT authorization for my project, and there's this specific step that I've been stuck for hours... So I have a middleware setup to try and verify the access token ...
0
votes
1
answer
28
views
The input in searchbar disappears when i click on any other space/part of the browser of when i click tab button
import React, { useState, useEffect, useRef } from "react";
import { useNavigate } from "react-router-dom";
import axios from "axios";
import Autocomplete from "@mui/...
0
votes
1
answer
19
views
npm install angular/cli isnt working - seems stuck midway, no log, no error regarding why it is stuck
Can anyone help me with an issue I have during npm install @angular/cli
Below are the details
Command I am running: npm install -g @angular/cli
What I am seeing: the install starts pulls some ...
0
votes
0
answers
7
views
Axios cannot handle binary response and returns 500
I have a middleware server build with nodejs. I use it to communicate with different APIs. One of the endpoints is to get a pdf file that comes in binary format like
%PDF-1.4
%����
1 0 obj
<<
/...
0
votes
0
answers
12
views
Getting "Error: ENOENT: no such file or directory, stat '/root/e-server/ecom/ecom/web/index.html" launching a flutter web app on an node.js server
I getting this error in chrome, after uploading an flutter web app on an ubuntu/nodejs server and i am not sure, if the path is incorrect.
Iam trying to launch an flutter web app on an nodejs server (...
0
votes
0
answers
12
views
'UserInput\01-starting-project\node_modules\.bin\' is not recognized as an internal or external command
'UserInput\01-starting-project\node_modules.bin' is not recognized as an internal or external command, operable program or batch file.
node:internal/modules/cjs/loader:1222
throw err;
Error: Cannot ...