index.test.js and Terminal – npm test and did i wrong?
**index.test.js
fireEvent.click(refreshButton);
Can’t run “node index.js” due to a syntaxError
My code is the following;
I can’t access the cookie even though it has been set on browser
i use expessJS, cookiePaser and try access cookie but it always return undefined eventhough it has been set on browser
Authorization missing or empty after setting Headers
I’ve been trying to add set the authorization in my headers after a user logs in, but no matter what I’ve tried, the authorization field is either empty or missing.
How can I solve a SyntaxError: The requested module ‘./routes/pedidos.mjs’ does not provide an export named ‘default’
I’m new with Javascript and now I’m trying to make an api with express, but the import crashes with the following message:
My node js app is crashing when I import my node router. Can anybody help what I can do to fix this
My node js server is crashing when I import the node routes. When I remove
the routes, it works. I have tried to find the problem but I couldn’t. The path is actually correct when I double checked. Can anybody suggest a solution. Here is a photo of it
local host not running on any port on my windows machine.?
When I was trying to run my app the localhost was not running on any port. I have tried each and every method that I could think of or any other that I find relevent on the internet but nothing seems to work.
expressjs not sending response
I’ve done this 100 times, but I’m not sure what’s going on in this instance… I send login creds from my page to an express server:
program redirects to another page, but its html is not showing up. program says ‘cannot GET /page’
A newbie in Express + Nodejs here. My program is trying to redirect a user from the home page to a registration page. I added the a href attribute to one of my buttons to do that:
I am trying to modify request.body object property value but it show undefined
I am receiving and Invoice Object through req.body. I am assigning the invoiceNumber before saving this object to the database (mongoose). When I assign invoiceNumber to invoicebody.invoiceNumber, it turns to be Undefined but, the result.invoiceNumber = 1.