Error:
When trying to run Node-RED I encountered the following error: Essentially it’s missing the module “express”, as can be seen by the 5 line.
module.js:340
throw err;
^
Error: Cannot find module 'express'
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 Object. (/home/alex/Apps/node-red/node-red-0.9.1/red.js:19:15)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
Fix:
In order to fix it, simply install the missing module using the following command.
npm install express
Note: If you’re getting several of these errors (express, nopt, when, uglify-js, clone, ws, etc) in a row after you’ve download and tried to run Node-RED, you might have missed the step to install all the packages:
npm install --production