Questions tagged [node.js]
Node.js is an event based, asynchronous I/O framework that uses Google's V8 JavaScript engine. Node.js is commonly used for heavy client-server JavaScript applications. NOTE: Please read the Tag-Wiki before asking questions.
1,043 questions
0
votes
0
answers
32
views
How can I know which system libraries managed by Ubuntu apt an npm build using node-gyp depends on?
I have a nodejs-based project running on my Ubuntu server, using the usual node_modules folder of dependencies. Some of them where (eg. "ws" in this case) where automatically compiled using ...
0
votes
0
answers
61
views
What kind of garbage is been accumulated when execute the Docker repeatedly? (Node.js, "ENOSPC: no space left on device" error) [duplicate]
My VPS has Ubuntu 22.04.4 LTS.
I got the message from the Docker container when installed the npm dependencies inside this container:
> [front_server 4/4] RUN npm install --no-package-lock:
36.78 ...
0
votes
0
answers
69
views
running screen is slow when running using node's spawn
I'm running this command: screen -S server -X stuff $'\003' when I run it directly in bash it execute immediately. When I'm running it through node's spawn, it takes several seconds for the command to ...
0
votes
0
answers
149
views
WebAssembly 'Out of Memory' Crash in PM2 – Resource Limits Set to Unlimited But Still Failing
I am facing an issue with PM2 while running a Node application. I am seeing this error in the PM2 logs.
1|abc | RangeError: WebAssembly.instantiate(): Out of memory: Cannot allocate Wasm memory for ...
0
votes
1
answer
156
views
Npm run build for NextJS app runs out of memory on new Lightsail server but works fine on old one
First, some backstory:
I currently have my personal website (I know Server Fault is supposed to be for business environments, but it seemed like the best place to ask this question) hosted on an ...
0
votes
1
answer
75
views
Serve requests with AWS EC2 and Lambda on the same endpoint
I reduced my problem to the following example. We have two XML request types: <data1>some-data</data1> and <data2>other-data</data2> coming to the same endpoint something like ...
0
votes
0
answers
104
views
Getting error while hitting my api using domain - Error 502 Bad Gateway
My backend is in nodejs, hosted on VPS, using nginx for reverse proxy. After certain recent merges I have started getting 502 Bad gateway error
<html>
<head>
<title>502 Bad ...
0
votes
0
answers
402
views
Websocket closes immediately after connection
I have previously set up a node.js websocket server that is working without issue. I have 3 different webpages that access the websocket server currently. Each page has a parameter in the uri called &...
1
vote
1
answer
930
views
Failing to use node in alpine-powered docker container
I'm failing to run my webapp project in a fresh arch linux install. It uses docker and docker-compose.yaml to create DB, nginx server etc. This project is already running in multiple PCs and cloud ...
1
vote
2
answers
299
views
Nginx configuration unable to serve Node.js app not located a web root
Goal
With a Nginx web server, run a standalone Node.js app which server dynamic pages in response to API calls (e.g. ../tempestvue/.next/standalone/.next/server/app/api/weather/route.js).
Issue/...
0
votes
0
answers
48
views
Sync NodeJS program inside kubernetes cluster hangs (while idle)
I been deploying a NodeJs server to GKE without problems for some time.
The app is a simple node server
The docker final command just invokes the start script:
CMD ["node", "scripts/...
1
vote
0
answers
565
views
VM Integrity Validation Failed
I am running a Node.js project on a Google Cloud Platform (GCP) VM. The following issue has occurred for the past several days:
VM Integrity Validation Failed
What I’ve Tried:
Checked VM Logs: Looked ...
0
votes
1
answer
194
views
Apache2 - How to execute CGI script with .json file-extension?
THE PROBLEM
I have an Apache2 server with scripts in /cgi-bin/ working for various languages. It appears to be currently working for any file-type extension... Except .json . .json files fail, ...
0
votes
0
answers
51
views
"Unauthorized: No token provided")
Hi I just have this small problem i'm trying to create a workout website that basically nothing or needs is meant to work until the user authenticated yeah so l've l've created everything. l've done ...
1
vote
0
answers
126
views
pm2 frontend process restarts how to debug
We have a server running on CENTOS and as stack we use VUE3 with Nodejs, NUXT and EXPRESS js
Pm2 is also used for process management
The server has been running for a couple of years but lately we've ...
0
votes
1
answer
486
views
Unable to Resolve DNS for api.huggingface.co on Ubuntu 24.04 - Node.js Application Issue
I'm working on a Node.js application hosted on Ubuntu 24.04, integrating with Hugging Face's API for fine-tuning models. However, I’ve encountered a persistent DNS resolution issue when trying to ...
0
votes
0
answers
87
views
How do I grant a script the ability to read certificates in a directory and only that directory without the whole process running as sudo?
I'm building a node.js (18.19.1) web server on Ubuntu 22.04 and using PM2 process manager to daemonize.
The main script requires read and execute access to two certificate files stored in a separate ...
0
votes
2
answers
630
views
Why does my Digital Ocean server sometimes hang when running Node.js, NPM or Docker
I am running server-side software on Digital Ocean servers. These include Docker, NPM, Node.js, and others. The server is running Ubuntu 22.04.
Sometimes, the server hangs randomly for several minutes....
0
votes
1
answer
238
views
Check if a subdomain is in a list of subdomains and use a different proxy_pass depending on if the subdomain is in the list. Using wildcard
I want to serve an old version of a node app to the users that already created a subdomain.
New users will receive new subdomains and see a new version of the app.
The old app is on port 8090.
The new ...
0
votes
1
answer
114
views
fleek.co NextJS docker image version 18 possible?
I have a NextJS app, that I deploy to fleek. There it gets built and deployed. I recently changed something which requires a newer node version (version 18)
The deployment used node-16 and therefore ...
0
votes
1
answer
264
views
Script runs from CLI but not in CRON
I'm aware that this is a very vague question but I'm hopeful someone more knowledgeable can help.
My setup is as follows:
I have a simple node docker container
I use it to run Node.js scripts from ...
0
votes
1
answer
934
views
nginx assets not found node js express static rendering
I'm having a similar issue as here, I have a node js express server rendering a build react app ( CRA ) in a folder /public/build. However while using nginx as a reverse proxy, assets get status 404 ...
0
votes
1
answer
151
views
Nginx: only shows website when port is specified
I have the following configuration in /etc/nginx/conf.d/new_sites.conf:
server {
listen 80 default_server;
server_name website.xyz www.website.xyz;
location / {
proxy_set_header X-...
0
votes
0
answers
1k
views
nginx error - (2: No such file or directory) when making req through frontend
In an ubuntu server I have two versions of a node.js + express & reactjs app , one for test and another for prod. Their path is something like (sorry for the bad representation. Tell me if you ...
0
votes
1
answer
6k
views
Resolve "GPG Key check Error" updating packages
I'm trying to update node on an existing server from v20.10.0 to v20.12.2 using
sudo dnf update.
But get the following error:
Node.js Packages for Linux RPM based distros - x86_64 ...
-3
votes
1
answer
571
views
Making production-ready + securing a server (Ubuntu 22.04, NodeJS, nginx)
I started working for a startup as a full stack developer. The product is a SaaS that has been developed by an external company, and they take care of the hosting as well. My boss wants the app on our ...
0
votes
0
answers
219
views
EC2 micro instance randomly uses 100% of CPU and stays there
I am running a node.js service and a docker postgres image on an EC2 micro instance. Usually it runs fine for weeks / months but randomly the instance goes up to 100% CPU usage and stays there, ...
0
votes
1
answer
176
views
how to grant network access to mongo atlas to a EKS deployment
problem:
I have an app running on a EKS cluster that needs to connect with a mongodb atlas database.
I must grant the app running on the EKS cluster network access by entering its IP address.
I do not ...
0
votes
0
answers
1k
views
How to allow full use of all available swap space, when a process is running inside a Docker container
I have written a test Node app which eats memory (in 100MB chunks). I am trying to get it to continue allocating memory beyond the physical memory limit of 8GB by using the swap space which is ...
0
votes
2
answers
137
views
Quasar (VueJs), nodeJs, Nginx certbox Too many requests
I have following nginx conf for my quasar(VueJs app) and nodejs (as API) app
As you can see my nodejs app is in /api location, the rest of config is for my Quasar (vuejs) app...
The problem I have is ...
0
votes
1
answer
224
views
Is it the OS or Samba that is restricting access to systemd on a shared folder?
I have two Rocky Linux 9 servers that we can call svr1 and svr2.
svr1 has Samba service installed and share the folder /home/rocky/shared_folder with this configuration:
[global]
# workgroup = ...
0
votes
1
answer
136
views
Is it possible to bind a port with HTTPS in nginx
I have a graphql api that works when accessed with http://example.com:4001/graphql but does not work with https://example.com:4001/graphql which is obvious as https takes the port 443 and here I am ...
0
votes
1
answer
558
views
Local nginx server requires reload every time dev server restarts
I have 2 local dev servers in node. One is a basic nextjs server and the other a very simple nodejs websocket server. I wanted to proxy both to get the both under the same port. I have the following ...
0
votes
0
answers
86
views
Choosing a hosting a reactjs, nodejs application
I have application built with reactjs, nodejs and mysql db, currently I am hosting it on godaddy VPS. The main reason why we had to go for their VPS, because we already had a legacy app on their ...
1
vote
0
answers
3k
views
ERROR: gcloud.run.deploy Revision is not ready and cannot serve traffic
I am new with GoogleCloud & GoogleCloudRun, I have deployed two applications at my Google active Project -
Next.JS app running at 3000 port
Express.js app running at 8080 port
When I tried to ...
0
votes
1
answer
363
views
Securing a secret key on a linux server to be consumed by a software running on the server
I'm not an expert in server security and I have a question regarding a situation where server is being compromised. I have a nodejs app which is a bot that only have https connection to read from some ...
1
vote
1
answer
810
views
Is there a tool like ClamAV to scan PHP and JS files?
We're offering a shared web hosting service, where many websites live on the same server.
Since a lot of people don't update their stuff, they get pirated all the time. Now, the websites are ...
0
votes
0
answers
68
views
Is it possible to disallow external IPs from accessing a page of a React site?
I'm currently learning React to host a personal website (on an Ubuntu server) and am port forwarding it to allow access from the internet.
However, for security reasons, I'd like one or more pages to ...
0
votes
1
answer
2k
views
PHP openssl encryption aes-256-cbc and decryption using NODEJS
I have a PHP script used to encrypt data with openssl_encrypt() and the aes-256-cbc algo.
Encryption/Decryption works well using PHP, it's an old script.
I've been trying to decrypt the datas using ...
0
votes
1
answer
1k
views
pm2 process kill the server by running pm2 update multiple times
We stumbled upon a very strange problem while running any pm2 command. While running
pm2 list
we got this result inside console
[PM2] Spawning PM2 daemon with pm2_home=/root/.pm2
[PM2] PM2 ...
0
votes
1
answer
319
views
PM2 + apache2 Optimization
I am running a Node.js application with PM2 as a reverse proxy through Apache on my Centos 7 server. The website experiences very slow loading times, and its performance is quite poor. Can anyone ...
3
votes
1
answer
7k
views
Install nodejs 20 on Debian Bullseye in Docker
I have Debian in a Docker container, and was installing NodeJS like this:
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash ;\
apt-get update; \
apt-get install -y nodejs
It worked ...
0
votes
1
answer
2k
views
Is it possible to use HTTP/3 with NGINX-Node.js combination already?
NGINX supports HTTP/3 since 1.25.0. Node.js currently does not support HTTP/3 or QUIC out-of-the-box but it seems there are some C++ addons implementations, like FAILS'.
HTTP/3 (more specifically, ...
1
vote
0
answers
2k
views
pm2 in systemd not actually starting processes
I'm having an issue where I'm running pm2 as pm2-root under systemd (this is on Amazon Linux2023). The daemon runs fine, and if a process dies, it restarts it fine. However, if the server reboots, pm2-...
0
votes
2
answers
1k
views
Google Cloud Platform authentication - unable to list projects or set project
I had previously authenticated with Google Cloud Platform and everything was working correctly, however all of a sudden, today I started receiving errors mentioning google-gax in a Node app:
2023-09-...
0
votes
1
answer
794
views
Apache Cannot See PM2 Node Process
I have Apache running on Ubuntu 20 and I keep getting this error in /var/logs/apache2/error.log:
[proxy:error] [pid 7064] (111)Connection refused: AH00957: http: attempt to connect to 127.0.0.1:4000 (...
0
votes
0
answers
288
views
migrate pm2 services to new server
In order to support the most recent versions of NodeJS, we need to migrate our web servers from Amazon Linux 2 to Amazon Linux 2023. Making this move precludes us from doing the usual spin-up/down ...
0
votes
1
answer
1k
views
How to setup Nginx and Varnish reverse proxy for Node.js?
My website on the Astro framework (Node.js SSR adapter) is deployed on 1 shared-cpu-1x@256MB fly.io instance in the Amsterdam region, which automatically handling gzip, TSL termination.
Initial setup ...
0
votes
0
answers
296
views
Exposing ports on VPS
I'm running some services inside Docker and been having some issues with it: I have a NodeJS app (TLS stream communication) running on a custom port (let's say 2321). I exposed the port from my ...
0
votes
1
answer
709
views
Intermittent connection reset errors on multiple sites using chrome, mingw curl and nodejs on Windows, but not in PowerShell or Linux VM
This started happening a month or two ago. I have a node script which fetches from:
https://raw.githubusercontent.com/glowbuzzer/gbr/master/package.json
This has started failing about one in three ...