Error: Cannot find module ‘ejs’

I had this exact same problem a couple of days ago and couldn’t figure it out. Haven’t managed to fix the problem properly but this works as a temporary fix: Go up one level (above app.js) and do npm install ejs. It will create a new node_modules folder and Express should find the module then.

Node.js Error: connect ECONNREFUSED

Chances are you are struggling with the node.js dying whenever the server you are calling refuses to connect. Try this: This keeps your server running and also give you a place to attach the debugger and look for a deeper problem.

What is Procfile? and Web and Worker

Procfile is a mechanism for declaring what commands are run by your application’s dynos on the Heroku platform. From Process Types and the Procfile, which is a good introduction, but basically you use the Procfile to tell Heroku how to run various pieces of your app. The part to the left of the colon on each … Read more

What is Procfile? and Web and Worker

Procfile is a mechanism for declaring what commands are run by your application’s dynos on the Heroku platform. From Process Types and the Procfile, which is a good introduction, but basically you use the Procfile to tell Heroku how to run various pieces of your app. The part to the left of the colon on each … Read more

How to use npm jquery module?

To use jquery in node, you need to have two separate node package installations. jquery jsdom to create a dummy window object which jquery can use. Installation: In code: Or, with newer versions of jsdom: Using global.$ will make the jquery object($) available globally in your project.

How do I uninstall a package installed using npm link?

The package can be uninstalled using the same uninstall or rm command that can be used for removing installed packages. The only thing to keep in mind is that the link needs to be uninstalled globally – the –global flag needs to be provided. In order to uninstall the globally linked foo package, the following command can be used (using sudo if necessary, depending on … Read more

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