Guest User

Untitled

a guest
Aug 18th, 2019
57
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Error: Cannot find module 'ejs '
  2. at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
  3. at Function.Module._load (internal/modules/cjs/loader.js:507:25)
  4. at Module.require (internal/modules/cjs/loader.js:637:17)
  5. at require (internal/modules/cjs/helpers.js:22:18)
  6. at new View (/home/tullio/Desktop/programming/webDev/advancedExpress/EJSDemo/node_modules/express/lib/view.js:81:14)
  7. at Function.render (/home/tullio/Desktop/programming/webDev/advancedExpress/EJSDemo/node_modules/express/lib/application.js:570:12)
  8. at ServerResponse.render (/home/tullio/Desktop/programming/webDev/advancedExpress/EJSDemo/node_modules/express/lib/response.js:1012:7)
  9. at /home/tullio/Desktop/programming/webDev/advancedExpress/EJSDemo/app.js:5:7
  10. at Layer.handle [as handle_request] (/home/tullio/Desktop/programming/webDev/advancedExpress/EJSDemo/node_modules/express/lib/router/layer.js:95:5)
  11. at next (/home/tullio/Desktop/programming/webDev/advancedExpress/EJSDemo/node_modules/express/lib/router/route.js:137:13)
  12.  
  13. ejsdemo@1.0.0 /home/tullio/Desktop/programming/webDev/advancedExpress/EJSDemo
  14. -ejs@2.6.2
  15. -express@4.17.1
  16.  
  17. total 32
  18. -rw-rw-r-- 1 tullio tullio 185 ago 17 18:20 app.js
  19. drwxrwxr-x 53 tullio tullio 4096 ago 18 21:43 node_modules
  20. -rw-rw-r-- 1 tullio tullio 285 ago 18 19:42 package.json
  21. -rw-rw-r-- 1 tullio tullio 14459 ago 18 19:42 package-lock.json
  22. drwxrwxr-x 2 tullio tullio 4096 ago 18 19:41 views
  23.  
  24. var express = require("express");
  25. var app = express();
  26.  
  27. app.get("/", function(req, res){
  28. res.render("home.ejs ")
  29. });
  30.  
  31.  
  32. app.listen(3000, function(){
  33. console.log("Server Online")
  34. });
  35.  
  36. {
  37. "name": "ejsdemo",
  38. "version": "1.0.0",
  39. "description": "",
  40. "main": "app.js",
  41. "scripts": {
  42. "test": "echo "Error: no test specified" && exit 1"
  43. },
  44. "author": "Tullio Angius",
  45. "license": "ISC",
  46. "dependencies": {
  47. "ejs": "^2.6.2",
  48. "express": "^4.17.1"
  49. }
  50. }
RAW Paste Data