Skip to main content
The 2024 Developer Survey results are live! See the results

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.

3 votes
1 answer
1k views

Why use supertest instead of unit tests for expressJS?

While searching for how to test my node.js software, I came across many answers advising to use Supertest. Before using Supertest I was testing my app this way: app.get('/', base_road); function ...
-3 votes
0 answers
13 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"; ...
-1 votes
1 answer
13 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 ...
14 votes
2 answers
5k views

npm is really slow while installing/updating packages from private git repositories

I use a lot of private node packages (stored on my personal github repositories) in my projects: "devDependencies": { ... "my-package": "github:username/my-package#master&...
2 votes
1 answer
7k views

Insert data into postgreSQL using nodejs typescript

My code looks like this signup.post('/signup', urlendcodedParser, async(req: Request, res: Response) => { const username = req.body.username; const password = req.body.password; ...
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:...
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
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
8 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
1 answer
68 views

Nodejs Server sent events reading undefined at the JavaScript front-end [closed]

I am working with mobile wallet gateway for user on a website pay for a service. I need to send every stage and what the server is currently doing all the way to waiting for user response that is ...
0 votes
0 answers
91 views

How to receive message from Twilio via websockets?

I need to recieve audio data from calls in progress from Twilio via WebSockets. I am using Nest.js + socket.io. Here is the code: public async startCall() { const wsUrl: string = 'wss://2ed5-176-...
0 votes
1 answer
27 views

Playwright in a Docker suddenly stopped working "Executable doesn't exist at /home/.cache/ms-playwright/chromium-1124/chrome-linux/chrome"

It was working fine up until yesterday. Full setup is Playwright in Express in a Docker container in Google Cloud Run. Preferably headful but I'd accept anything at this stage. browserType.launch: ...
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 ...
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
23 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 = ...

15 30 50 per page
1
2 3 4 5
31582