Questions tagged [nodejs-server]
405 questions
0
votes
1 answer
Get Async Dependency globally Inversify
I wish to get an asynchronous dependency at the top level, without having to use top level awaits.
Currently I am using a temporary hack by declaring getService(), an asynchronous function, in the controller file. However, by doing so I have to call…

bik555
- 13
- 3
0
votes
0 answers
How to send jspdf to nodejs server from angular
type here
Hi
I want to convert html to pdf in angular using jspdf and send to nodejs server
Can anyone help me?
Or give me advice please
I have this code saved in the browser and I want to send it to the nodejs server
public openPDF(): void {
…

ilia898
- 1
0
votes
2 answers
nodejs: TypeError: Cannot read properties of undefined (reading 'close')
process.on('unhandledRejection', (err, promise) => {
console.log(`Error: ${err.message}`.red);
//close server & exit process
let server;
server.close(() => process.exit(1));
});
C:\Users\Ford\Desktop\DevCamperAPI\server.js:48
…
0
votes
1 answer
download the source code from github to my local server
so my question is I have a local nodejs server that is running on raspberry pi.The server is working with many ports and database and all. So my requirement is that when I upload a new source code to my github I need my local server to know that new…

vishnu nair
- 3
- 1
- 4
0
votes
0 answers
Uncaught (in promise) TypeError: Failed to fetch in Node Js Application
I am trying to send data to a node js server and then send a message to my email address but I have failed to figure out how to fix this error
TIS IS THE FRONTEND CODE
let donationForm = document.getElementById('donation-form');
const donorUrl =…

Kajura Henry
- 1
- 1
0
votes
1 answer
Apollo graphql application cookie not set in browser
I am using apollo graphql on backend side and using cookie authentication method. But when I set cookie on backend side cookie was in Set-Cookie header but doesn't showed in Browser->application ->cookies
response.cookie('tokens', token, {
…
0
votes
0 answers
Unable to deploy a node.js / vue.js SPA online
I'm working on a project for adding an external pre-registration page with Stripe to a Wordpress website.
The wordpress is already in place. But the pre-registration page needed the Stripe module, working on back-end...
So I've decided to make a SPA…
0
votes
0 answers
Mongoose:Validation error path is required
**I'm trying to save a new document in mongodb with mongoose, but I am getting ValidationError: Path 'email' is required., Path 'passwordHash' is required., Path 'username' is required. even though I am supplying email, passwordHash and…
0
votes
1 answer
How to make the node js code always run even if the system is shutdown
i have created the cron job using node js ,which have to run in the interval of every hour even if the system is shut down. It has to run automatically with out manual invoke of the code .Please help to solve this
i have tried with pm2 but not…
0
votes
0 answers
Does event-demultiplexer of nodejs gathers requests of non io task?
As we can see in the above diagram Event demultiplexer collecting requests that are require io work. Event demultiplexer sened these requests to system hardware to process io requests asynchronously in non blocking way. Once io work complete Event…

anil Kumar
- 1
- 1
0
votes
2 answers
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client [node and express js]--
I am trying to get data by Id records saved in mssql database. for eg. I am forming a get request in postman like this: localhost:3200/api/v1/players
Problem is I am getting error displayed as follows:
node:_http_outgoing:576
throw new…

Prabir Choudhury
- 143
- 1
- 18
0
votes
3 answers
uri is returning undefined. Mongodb connection is not been established
enter image description here I need to know what's the problem. I am not getting the message on console for establishment of Mongodb database connection.
Here is a link to the error picture.…

Tripti Verma
- 1
- 1
- 5
0
votes
0 answers
Is there a way to know the size in pixels of a string in Nodejs?
I need to get the size in pixels of a given string to properly center a text in a PDF generated with PDF-Lib. I've found some npm packages that can do the job, but does it exists some way to achieve with pure JS?

Danubio
- 93
- 8
0
votes
3 answers
password authentication token / Nodejs - Express JWT
I'm having trouble logging into the server to do the authentication tests for my JWT password token, it claims problem
no " required:jwt({"
grateful to whoever helps me
user side of authentication
I tried changing the commas but the problem…

João Victor
- 3
- 1
0
votes
0 answers
Error: Route.get() requires a callback function but got a [object Promise] at Route
My problem is as the title of the question is. I am trying to isolate the concerns in my node n express app into separate routes and controllers to keep main server.js file clean.
My project structure is as
controller
|----------…

Prabir Choudhury
- 143
- 1
- 18