All Questions
340 questions
1545
votes
22
answers
1.0m
views
How can I get the full object in Node.js's console.log(), rather than '[Object]'?
I have this object:
const myObject = {
"a":"a",
"b":{
"c":"c",
"d":{
"e":"e",
"...
0
votes
0
answers
49
views
Can set breakpoints in .js files in vscode only after started vite debugger?
Why I can only set valid breakpoints in .js files in vscode AFTER starting the vite (node.js) debugger?
Not working:
npx vite (starting the server)
Set breakpoint in vscode
Start Debugger with F5
New ...
0
votes
2
answers
72
views
I have function calling anther function to return string, but I get undefined. because of the read file implement first [duplicate]
I'm not that expert, but I can handle it:
this calling the function checkTLS
// params={ibmdev_tls: 'not imp',ibmqa_tls: 'not imp',ibmqa_ssl: 'not imp'}
Object.keys(params).forEach( key => {
...
1
vote
0
answers
47
views
Express middleware not receiving data from service function, instead data goes directly to client (Postman)
I'm encountering an issue with my Express application where data fetched by a service function is bypassing the middleware and going directly to the client (Postman). Here is my setup:
I have a ...
3
votes
1
answer
4k
views
Next.js, debugging server-side code with chrome devtools. Breakpoints are ignored and console output does not go to chrome devtools
I'm following this guide.
https://nextjs.org/docs/advanced-features/debugging
And I'm trying to use the chrome debugger to debug the server part of a next js application (without using VS Code).
I ...
2
votes
1
answer
374
views
How to get "initiator" debugging information for promises?
When debugging a then promise callback in Node.JS using something like Visual Studio Code, the Call Stack seems almost redundant. Instead of providing the function that actually called my code from a ...
0
votes
0
answers
58
views
Error: Route.post() requires a callback function but got a [object Undefined]...what
get this error when i try to run the server
`Error: Route.post() requires a callback function but got a [object Undefined]`
`i THINK this chunk of code is the cause of the error but i am not sure`
...
2
votes
1
answer
1k
views
Node.js returns TypeError when creating a file using fs.writeFile
I've just started learning Node.js. Right now I'm working on creating new files and directories methods.
This is my code:
var fs = require('fs');
fs.mkdir("stuff", function () {
fs....
0
votes
2
answers
51
views
node js crashing, saying a variable is undefined, when it isnt
Here is my GET request handler, to render a page:
app.get("/:band", async (req, res) => {
const page = req.params.band;
try {
const result = await db.query("SELECT * FROM ...
0
votes
2
answers
1k
views
No way to step into node_modules anymore?
Is it just me, or Chromium DevTools stopped to stop at breakpoints in node_modules (including /usr/lib/node_modules)?
a.js:
console.log('a.js');
require('./b');
b.js:
debugger
console.log('b.js');
...
0
votes
0
answers
38
views
Why does my Node.js application not stop when using --inspect?
I have the following Node.js application here:
const express = require("express")
const bodyParser = require("body-parser")
const mysql = require("mysql2")
const path = ...
1
vote
1
answer
534
views
how to debug javascript files invoked from cypress test file
I'm running on Cypress version 12.14.0. I have my regular Cypress project structure. I have cypress.config.js and under e2e directory I have the test files such as test1.cy.js
What I'm unable to ...
10
votes
2
answers
27k
views
Node js debugging not working in Visual Studio code (year 2020)
I have gone though similar questions and none of the answers help perhaps because the configurations have changed in the latest VS Code or they are not relavant.
I get this error when I try to launch:
...
0
votes
2
answers
285
views
VSCode debugger does not work when cross-env is set
This is my test script. For some reason, when cross-env is called, vscode debugger doesn't work
{
"test": "cross-env NODE_OPTIONS='--experimental-specifier-resolution=node' ...
1
vote
0
answers
1k
views
JavaScript Node Segmentation fault
I'm currently working on a Windows 11 Laptop and Ubuntu 22LTS desktop PC. Only on PC the program suddenly interrupts. After some research I found out it's running in an 'Segmentation fault' - error, ...