First of all,I am running everything on Windows. What happens is: When I type in terminal: 'node app.js' to run my script, an error occurs , it says it won;'t find the openlayers module.HOWEVER:
That according to my knowledge it means that it will not find the openlayers module that I require in my app.js file like this:
var OpenLayers = require('openlayers').OpenLayers;
Although I have installed openlayers module both locally and globally still it will pop up the error.
Also, I have set the NODE_PATH in system variable to the folder that contains the archives of the modules!
Guys and girls, what could be wrong, I am running out of options? Could it be the module itself? All other modules are recognised according to plan. When I go
npm list -g
all the modules are installed according to plan!
EDIT 1: I have set the NODE_PATH variable to %AppData%\npm\node_modules but still it won't work! The folder 'app.js' is in and I run the 'node app.js' command in has no m\'modules' file. This local file exists one folder back.
EDIT 2: Here's a screenshot of my error : http://prntscr.com/4zfiyn