Node.JS: Error Cannot find module [SOLVED]

Even though I have installed my npm package globally, I receive the following error : Error: Cannot find module ‘color’ at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at repl:1:2 at REPLServer.self.eval (repl.js:110:21) at Interface. (repl.js:239:12) at Interface.emit (events.js:95:17) at Interface._onLine (readline.js:202:10) at Interface._line (readline.js:531:8) I did …

npm –save or –save-dev. Which one to use?

Introduction If you have ever worked in NodeJs, you must have install one or two packages through “npm install <package>” command.  By running this command, the nodeJs will install this package on your working directory, under node_modules. To save this packages as your dependencies, under package.json, you have two choices: –save-dev –save …

Nodejs tools

nodemon: By default node process needs to be restarted for picking any change in your JS file. Thus, every time there is a change, you will need to stop node process and start it again. You can automate this task by using nodemon npm package. This package will monitor any changes and it restart …