To resolve the error of title.
Move to root folder of express project. And install "npm install express ejs" again.
In the result, express module directory is created at folder "node_modules".
Other way, if you install express, already there is the express directory at your machine.
So please connect node_path to that directory.
This comment has been removed by the author.
ReplyDeleteAs explained on my blog: Error can not find module problem can be fixed with making sure that environment parameter NODE_PATH is set properly.
ReplyDeleteexport NODE_PATH="C:\Users\IMarek\AppData\Roaming\npm\node_modules"