Answer the question
In order to leave comments, you need to log in
How to solve "Callback must be a function"?
I decided to put myself an outdated version 3 of Express.js, installed it. I created a directory, went into it and entered into the console express -s -e
. It gave an error:
$ express -s -e
create : .
install dependencies:
$ cd . && npm install
run the app:
$ node app
fs.js:157
throw new ERR_INVALID_CALLBACK();
^
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at maybeCallback (fs.js:157:9)
at Object.fs.writeFile (fs.js:1276:14)
at write (C:\Users\Влад\AppData\Roaming\npm\node_modules\express\bin\express:41
2:6)
at C:\Users\Влад\AppData\Roaming\npm\node_modules\express\bin\express:385:5
at C:\Users\Влад\AppData\Roaming\npm\node_modules\express\bin\express:427:11
at C:\Users\Влад\AppData\Roaming\npm\node_modules\express\node_modules\mkdirp\i
ndex.js:48:26
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question