1
我有問題,以前試圖讓Meteor.require方法工作,我認爲它是固定的,但顯然不是。雖然我已經升級到流星0.9.0。流星:類型錯誤:對象#<Object>有沒有方法'要求'
任何人都知道如何讓Meteor.require方法工作?
這裏是我得到的終端上通過PARAMS時候回到服務器
=> App running at: http://localhost:3000/
I20140827-11:08:21.949(-7)? createImage
I20140827-11:08:21.953(-7)? 24890
I20140827-11:08:22.030(-7)? Exception while invoking method 'createImage' TypeError: Object #<Object> has no method 'require'
I20140827-11:08:22.032(-7)? at Meteor.methods.createImage (app/server/server.js:7:21)
I20140827-11:08:22.033(-7)? at maybeAuditArgumentChecks (packages/livedata/livedata_server.js:1492)
I20140827-11:08:22.034(-7)? at packages/livedata/livedata_server.js:643
I20140827-11:08:22.034(-7)? at _.extend.withValue (packages/meteor/dynamics_nodejs.js:56)
I20140827-11:08:22.034(-7)? at packages/livedata/livedata_server.js:642
I20140827-11:08:22.034(-7)? at _.extend.withValue (packages/meteor/dynamics_nodejs.js:56)
I20140827-11:08:22.034(-7)? at _.extend.protocol_handlers.method (packages/livedata/livedata_server.js:641)
I20140827-11:08:22.035(-7)? at packages/livedata/livedata_server.js:541
這是我Meteor.method:
createImage: function(coords) {
console.log('createImage')
console.log(coords.area);
var gd = Meteor.require('node-gd');
},
我packages.json文件:
{
"node-gd":"0.2.3"
}
node-gd絕對也有:
[email protected]:~/leaderboard/packages/npm/npm/node_modules/node-gd$ ls
binding.gyp build coffee cpp js package.json README.md
saimeunt,再次感謝!正當我想我有所有必要的更新!我會檢查一下,看看我能不能開始! – user1532669 2014-08-27 19:44:06
看起來像是已經排序 - 再次!非常感激!我終於可以回到我的項目了:)謝謝! – user1532669 2014-08-27 20:03:32