【发布时间】:2019-05-20 22:37:19
【问题描述】:
我安装了旧版本的 ExpressJS (npm i express@3 -g),但遇到了 express 生成器的问题。在我在 shell 中输入 express -s -e 后,我得到了:
$ 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
我的系统是 Windows 7。
【问题讨论】:
标签: javascript node.js express