【发布时间】:2018-06-04 22:42:56
【问题描述】:
我在使用此文档时遇到问题:https://github.com/VeliovGroup/Meteor-Files/wiki/Image-Processing。本文档指导如何为包创建缩略图 Meteor-File
我安装了所有需要的包,就像指导一样,但是当我运行代码时,它出现了问题:
Uncaught TypeError: Cannot read property 'prototype' of undefined
at patch (modules.js?hash=b849b729a9c5ee343b208254dca34d866ee59991:19084)
at graceful-fs.js (modules.js?hash=b849b729a9c5ee343b208254dca34d866ee59991:18945)
at fileEvaluate (modules-runtime.js?hash=8587d188e038b75ecd27ed2469a52b269e38fb62:343)
at require (modules-runtime.js?hash=8587d188e038b75ecd27ed2469a52b269e38fb62:238)
at index.js (modules.js?hash=b849b729a9c5ee343b208254dca34d866ee59991:16785)
at fileEvaluate (modules-runtime.js?hash=8587d188e038b75ecd27ed2469a52b269e38fb62:343)
at require (modules-runtime.js?hash=8587d188e038b75ecd27ed2469a52b269e38fb62:238)
at index.js (modules.js?hash=b849b729a9c5ee343b208254dca34d866ee59991:16624)
at fileEvaluate (modules-runtime.js?hash=8587d188e038b75ecd27ed2469a52b269e38fb62:343)
at require (modules-runtime.js?hash=8587d188e038b75ecd27ed2469a52b269e38fb62:238)
我跟踪,在这里找到了原型:
var fs$ReadStream = fs.ReadStream
ReadStream.prototype = Object.create(fs$ReadStream.prototype)
ReadStream.prototype.open = ReadStream$open
'fs' lib 在这里使用:
import fs from 'fs-extra';
请帮帮我!
【问题讨论】:
标签: javascript node.js meteor fs