no chunks found for file, possibly corrupt - qinhuaigan/loopback-start-demo GitHub Wiki
E:\git\dhotography-service-demo\node_modules\loopback-component-storage-mongo\node_modules\mongodb\lib\utils.js:123 process.nextTick(function() { throw err; }); ^ Error [MongoError]: no chunks found for file, possibly corrupt at Function.MongoError.create (E:\git\dhotography-service-demo\node_modules\mongodb-core\lib\error.js:31:11) at E:\git\dhotography-service-demo\node_modules\loopback-component-storage-mongo\node_modules\mongodb\lib\gridfs\grid_store.js:825:29 at E:\git\dhotography-service-demo\node_modules\loopback-component-storage-mongo\node_modules\mongodb\lib\gridfs\grid_store.js:1200:5 at handleCallback (E:\git\dhotography-service-demo\node_modules\loopback-component-storage-mongo\node_modules\mongodb\lib\utils.js:120:56) at E:\git\dhotography-service-demo\node_modules\loopback-component-storage-mongo\node_modules\mongodb\lib\collection.js:1416:5 at handleCallback (E:\git\dhotography-service-demo\node_modules\loopback-component-storage-mongo\node_modules\mongodb\lib\utils.js:120:56) at E:\git\dhotography-service-demo\node_modules\loopback-component-storage-mongo\node_modules\mongodb\lib\cursor.js:683:5 at handleCallback (E:\git\dhotography-service-demo\node_modules\mongodb-core\lib\cursor.js:171:5) at setCursorNotified (E:\git\dhotography-service-demo\node_modules\mongodb-core\lib\cursor.js:515:3) at E:\git\dhotography-service-demo\node_modules\mongodb-core\lib\cursor.js:599:16 at queryCallback (E:\git\dhotography-service-demo\node_modules\mongodb-core\lib\cursor.js:232:18) at E:\git\dhotography-service-demo\node_modules\mongodb-core\lib\connection\pool.js:469:18 at processTicksAndRejections (internal/process/task_queues.js:75:11) Emitted 'error' event on GridReadStream instance at: at GridReadStream._error (E:\git\dhotography-service-demo\node_modules\gridfs-stream\lib\readstream.js:231:8) at E:\git\dhotography-service-demo\node_modules\gridfs-stream\lib\readstream.js:184:28 at E:\git\dhotography-service-demo\node_modules\loopback-component-storage-mongo\node_modules\mongodb\lib\gridfs\grid_store.js:825:9 at E:\git\dhotography-service-demo\node_modules\loopback-component-storage-mongo\node_modules\mongodb\lib\gridfs\grid_store.js:1200:5 [... lines matching original stack trace ...] at processTicksAndRejections (internal/process/task_queues.js:75:11) { name: 'MongoError', message: 'no chunks found for file, possibly corrupt', driver: true }
解决办法: 进入 loopback-component-storage-mongo -> node_modules -> mongodb -> lib -> utils.js 注释掉 123 行代码 process.nextTick(function() { throw err; });