Error: callback function required
See original GitHub issueHi, when I add the viewengine to express like the following:
app.engine('html', jsrender.__express);
app.set('view engine', 'html');
I get this error:
Error: callback function required
at EventEmitter.engine (/Users/daslicht/DEV/jsviews/isomorphic/node_modules/express/lib/application.js:294:11)
at Object.<anonymous> (/Users/daslicht/DEV/jsviews/isomorphic/app.js:25:5)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Function.Module.runMain (module.js:467:10)
at startup (node.js:136:18)
at node.js:963:3
It is teh same code as in your example, what am I missing please?
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Error: callback function required - node.js - Stack Overflow
js:174 if ('function' != typeof fn) throw new Error('callback function required'); ^ Error: callback ...
Read more >callback function required · Issue #6 · express-vue ... - GitHub
Hey! I'm getting this error: throw new Error('callback function required'); My code is the example code const http = require('http'); ...
Read more >Error-First Callback in Node.js - GeeksforGeeks
The first argument in the function is reserved for the error object. If any error has occurred during the execution of the function,...
Read more >[Solved]-Error: callback function required-mongodb
[Solved]-Error: callback function required-mongodb · score:1. Accepted answer. As you can see in log - error on line 7 app. · score:0. Had...
Read more >data-error-callback | fastspringexamples
A JavaScript function you should provide, which will be invoked when an error is received from the backend. This function must accept 2...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This error happended to me and i realized that it was missing a “require” for (‘consolidate’)
@iguerrero84 - I didn’t understand you there. Were you getting the JsRender version 0.0.3 as a result of having a version of npm prior to 3.4.1? In that case you need to update npm then re-install JsRender.
Or was your error with a recent version of JsRender? (In which case can you explain where the require was missing - I don’t follow.)