未捕获的TypeError:无法读取未定义的流星文件包的属性'prototype' [英] Uncaught TypeError: Cannot read property 'prototype' of undefined Meteor-File Package

查看:123
本文介绍了未捕获的TypeError:无法读取未定义的流星文件包的属性'prototype'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用此文档时出现问题: https://github. com/VeliovGroup/Meteor-Files/wiki/Image-Processing .该文档指导有关为pakage创建缩略图图像 Meteor-File

I have a problem when using this documentation: https://github.com/VeliovGroup/Meteor-Files/wiki/Image-Processing. This doc guides about create thumbnail images for pakage Meteor-File

我安装了所有需要的软件包,如指南,但是当我运行代码时,它出现了问题:

I installed all need package like the guiding, but when I run code, it had a problem:

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)

我遵循了跟踪,并在这里找到了原型:

I follow the trace, and found the prototype in here:

  var fs$ReadStream = fs.ReadStream                                                                                 
  ReadStream.prototype = Object.create(fs$ReadStream.prototype)                                                       
  ReadStream.prototype.open = ReadStream$open  

'fs'lib在这里使用:

'fs' lib is using in here:

import fs from 'fs-extra';

请帮助我!

推荐答案

也许您应该尝试使用这种方法?

Maybe you should try with something like this ?

var fs$ReadStream = fs.ReadStream                                                                                 
fs.ReadStream.prototype = Object.create(fs$ReadStream.prototype)                                                       
fs.ReadStream.prototype.open = ReadStream$open  

希望有帮助.

这篇关于未捕获的TypeError:无法读取未定义的流星文件包的属性'prototype'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆