N
N
newaitix2017-07-07 16:37:58
Node.js
newaitix, 2017-07-07 16:37:58

Why does it give an error when trying to connect express-session?

npm i -g express-session
+ [email protected]
updated 1 package in 4.665s

I connect in an empty file I launch It throws an error
var session=require('express-session');
nodemon test.js
module.js:487
    throw err;
    ^

Error: Cannot find module 'express-session'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\server\apache\htdocs\socket\test.js:3:12)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
[nodemon] app crashed - waiting for file changes before starting...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
emp1re, 2017-07-07
@newaitix

npm i express-session

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question