throw er; // Unhandled 'error' event&Error: ENOENT: no such file or directory,
今天做一个文件上传的项目时, 用express-formidable往硬盘里面存文件时, 报 ENOENT:no such file or directory
原因就是程序不能像别的语言一样不存在就创建文件夹, 只有手动创建文件夹. 程序才能运行正常.
events.js:183 throw er; // Unhandled 'error' event ^ Error: ENOENT: no such file or directory, open 'D:\learning\myblog_v3\public\img\upload_ff831a558a928941ffac1784584a8db9.png' Program node index.js exited with code 1