2017-12-22 21 views
0

이 설명서를 사용할 때 문제가 있습니다 : https://github.com/VeliovGroup/Meteor-Files/wiki/Image-Processing. 이 문서는 약 나는 모두가 안내하지만이 코드를 실행하면, 그것은 문제가 있었다 등의 패키지가 필요 설치된 pakage Meteor-FileUncaught TypeError : 정의되지 않은 Meteor-File 패키지의 'prototype'속성을 읽을 수 없습니다.

에 대한 썸네일 이미지를 만드는 가이드 : 내가 추적을 따라

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'; 

도와주세요!

답변

1

어쩌면 이런 식으로 시도해야할까요?

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

희망이 있습니다.

+0

패키지 코드입니다. 나는 그들을 바꿀 수 없다. '( –