Skip to main content
1 vote
0 answers
26 views

I am trying to migrate old legacy NodeJS code that looks like: function x(data, callback) { doSomethingWithData(data); if(data.x) { setImmediate(callback, "A"); } ...
Anutrix's user avatar
  • 292
1 vote
0 answers
120 views

I'm using promisify with mysql2's execute method, and when I do so it always seems to pick the last overload even if it doesn't match the parameters I've provided. I've reduced the problem down to ...
uPaymeiFixit's user avatar
0 votes
1 answer
366 views

I am writing middleware to return database queries using SQLite3 and Next.js. Here is a snippet of code that I wrote to return the contents of a DB table. It appears to work, and my checks of sources ...
chrisroode's user avatar
0 votes
1 answer
718 views

While running node app.js the Express server is connecting properly and the MongoDB is connecting correctly, but I am facing a problem in the node module as mentioned above. The complete log is pasted ...
tecguy's user avatar
  • 9
0 votes
1 answer
107 views

This is an extremely weird bug I'm running into. Basically, I have this execFile: export const execFile = util.promisify(childProcess.execFile); When I use this to open up a dmg file that is currently ...
silent92's user avatar
3 votes
2 answers
4k views

I have installed the latets version of Node.js for Windows. Whatever command I use I always get the same exception, i.e. when I type "npm -v" get this error message: Cannot find module 'es6-...
Chilly Code's user avatar
0 votes
1 answer
2k views

I am trying to call a function and wait till the function gets data before further statements get executed. I am new to node js and async/await and promises. I tried some solutions but doesn't work it ...
Vahida Vadiya's user avatar
5 votes
1 answer
2k views

I need to write a test for a function in jest. I have function like following: async function fun(conn, input){ const connection = conn.getConnection(); .... // some output gets generated ...
Anutrix's user avatar
  • 292

15 30 50 per page