on-internet
← Community

How to solve "TypeError: fn is not a function"?

Stack Overflow ·

I'm trying to implement Passport.JS and JWT functionality into my nodejs application and receive the following error TypeError: fn is not a function in this code block of my application const utils = require('./utils') const strategies = require('./strategies') const pipe = (...functions) => args => functions.reduce((arg, fn) => fn(arg), args) const initialiseAuthentication = app => { utils.setup() pipe(strategies.JWTStrategy)(app) } module.exports = { utils, initialiseAuthentication, strategies } Would be awesome if someone could guide me in the right direction, as I am stuck here. Thank you

Comments

Sign in or sign up to comment and upvote.

No comments yet.