The term ‘node’ is not recognized… In Powershell

These issues cannot be installed from the Package Manager console, so I had to browse lot of things to fix the issues and finally I got the solution. Maybe we followed these scenarios Missing Node.js software Wrongly updated Windows environment path Installed in the wrong path Old version of Node.js software You can download the … Read more

req.session is undefined using express-session

Once you mount a router onto an Express app, any subsequently declared middleware on that app won’t get called for any requests that target the router. So if you have this: app.use(router) app.use(session(…)); The session middleware won’t get called for any requests that get handled by router (even if you declare the routes that the … Read more

How to properly return a result from mysql with Node?

You’re going to need to get your head around asynchronous calls and callbacks with javascript, this isn’t C#, PHP, etc… Here’s an example using your code: function get_info(data, callback){ var sql = “SELECT a from b where info = data”; connection.query(sql, function(err, results){ if (err){ throw err; } console.log(results[0].objid); // good stuff_i_want = results[0].objid; // … Read more

Class constructor cannot be invoked without ‘new’ – typescript with commonjs

TypeScript transpiles a class to its ES5 counterpart, but this way it’s necessary that entire class hierarchy is transpiled to ES5. In case parent class is untranspiled (native class or imported ES6 class, including the ones that were transpiled with Babel), this won’t work, because TypeScript relies on var instance = Parent.call(this, …) || this … Read more

Winston logging object

You are trying to insert a JSON object directly into the string, so it will print [Object Object] without the JSON.stringify. This is not fixable by configuring Winston, as this problem happens while the string is generated (before the logger.debug function actually reads it), so a console.log call would print the same thing. The first … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)