TypeError: require(...) is not a function
When I attempt to use
require() in a Nodejs repl, it throws the error in the title. What am I doing wrong?
require is not a function because you are trying to call the thing you required like a function example:
a = require("a"); a() <- this might throw an error because a itself might not be a function, this is equivalent of putting
so the thing you are trying to require might not be a function