bradtraversy / node_passport_login

Node.js login, registration and access control using Express and Passport
1.74k stars 1.29k forks source link

TypeError: require(...) is not a function #55

Closed davkub closed 4 years ago

davkub commented 4 years ago

Hello Brad,

I'm almost at the very end of your perfect course (I really like it), but I cannot get over one error that my terminal throws at me:

require('./config/passport')(passport); ^ TypeError: require(...) is not a function

I crawled through your entire repo but I cannot get it working. Note: That arrow is between .../passport') and (passport)

Can you help me, please?

davkub commented 4 years ago

I forgot to mention that this are lines from the app.js file from the very beginning.

const passport = require('passport');

const app = express();

// Passport Config
require('./config/passport')(passport);
davkub commented 4 years ago

Figured it out, got typo in export function.