Tag: meteor

在meteorEPIPE错误的html-pdf

我有一个使用html-pdf呈现PDF服务器端的Meteor应用程序。 该应用程序与mup部署。 本地,一切工作正常。 部署后,我在服务器日志中看到这个错误: events.js:72 throw er; // Unhandled 'error' event ^ Error: write EPIPE at errnoException (net.js:905:11) at Object.afterWrite (net.js:721:19) error: Forever detected script exited with code: 8 error: Script restart attempt #1 版本的东西: Ubuntu 14.04.2 LTS meteor1.0.4.2 Node.js 0.10.37 mup 0.9.7

在开始meteor之前,我应该学习node.js吗?

我来自java背景,最近我需要一个具有实时数据和推送的应用程序。 所以我想使用meteor,因为它似乎是一个更简单的方法来使用node.js。 我的问题是,我需要先学习node.js才开始meteor? 现在meteor适合用于生产应用(我知道它还没有达到1.0,但是从你的经验来看,你觉得怎么样) 谢谢。

Meteor的服务器端setInterval / clearInterval

我正在创build一个Meteor应用程序,其中包含一些简单的计时器。 按一个定时器上的开始或停止button,每个调用方法来设置或清除间隔定时器等等。 当我setInterval ,我将结果对象存储在当前的计时器文档中,以便稍后当我想要清除间隔计时器时很容易find。 这是我遇到的问题。 当运行Meteor.setInterval()服务器端时,它返回一个对象。 根据node.js文档,这是正常的。 如果我在创build之后logging结果对象,则返回: { _idleTimeout: 5000, _idlePrev: { _idleNext: [Circular], _idlePrev: { _idleTimeout: 5000, _idlePrev: [Object], _idleNext: [Circular], _idleStart: 1393271941639, _onTimeout: [Function], _repeat: false }, msecs: 5000, ontimeout: [Function: listOnTimeout] }, _idleNext: { _idleTimeout: 5000, _idlePrev: [Circular], _idleNext: { _idleTimeout: 5000, _idlePrev: [Circular], _idleNext: [Object], _idleStart: 1393271941639, _onTimeout: [Function], _repeat: […]

如何使用CollectionFS和graphicsmagick创build一个填充meteor某个区域的缩略图

现在我在这里使用代码: https : //github.com/CollectionFS/Meteor-CollectionFS#basic-example假设我想要一个缩略图100×100。 但是说我的图片是400×200,上面的代码会产生一个100×50的缩略图。 在这个例子中我想要发生的事情是将图像调整到200×100,然后剪裁到100×100。 我怎么做? 我怎样才能得到高度和宽度? 我知道我可以使用gm的大小函数,但是我不能把所有的callback包裹起来。

在meteor应用程序中调用exec时出现错误 – 最大调用堆栈大小超出未定义

这是完整的错误: 处理消息时出现内部exception{ msg: 'method', method: 'myServerMethod', params: [], id: '4' }最大调用堆栈大小超出undefined Meteor.methods myServerMethod: -> cmd = 'pwd' exec cmd, (err, stdout, stderr) -> 我不能,为了我的生活,知道为什么我得到这个错误。 我也试过这两个不同的机器。 我需要检查什么东西?

使用Meteor(CFS)下载远程图像

所以,我试图找出如何下载远程图像,然后使用CollectionFS存储下载的图像。 我试图在CFS中使用自动URL处理,但是我正在下载图像的主机已禁用HEAD请求,所以我无法使用它。 我要么使用Meteor.get,要么使用NPM的“请求”,但是我不太了解如何将这两者结合起来以获得所需的结果。 任何想法将不胜感激。 我所知道的只是在Meteor.get请求中使用这个URL,但在那之后,我真的迷失了方向。 这是我到目前为止所得到的,但是我不知道如何处理请求的结果: var result = HTTP.get(url); 我只假设我应该用result.body(按照Meteor文档)做某件事情,但是我不知道如何正确编码这个对象,以便它可以被推送到本地的CFS集合中。

如何在Meteor中执行服务器端文件处理操作?

我在服务器上使用GridFS存储Word(.docx)文件。 我希望能够通过使用docx-builder NPM软件包将文档合并到一个Word文件中。 以下是我如何上传文件: Meteor.methods({ uploadFiles: function (files) { check(files, [Object]); if (files.length < 1) throw new Meteor.Error("invalid-files", "No files were uploaded"); var documentPaths = []; _.each(files, function (file) { ActivityFiles.insert(file, function (error, fileObj) { if (error) { console.log("Could not upload file"); } else { documentPaths.push("/cfs/files/activities/" + fileObj._id); } }); }); return documentPaths; } }) […]

如何处理meteor.js中的条件文件下载

在PHP中,你可以使用头来强制下载文件,也可以隐藏实际的文件位置等 如果您只希望在特定条件下的某些用户能够下载某些文件,这非常有用。 我将如何在meteor中做到这一点? 我已经玩了Node.js fs模块,并设法检索客户端上的文件的二进制版本。 但是,我将如何将其转换为下载的实际文件? 谢谢!

错误:无法find所有Meteor命令在控制台中引发的模块“下划线”

错误:无法find所有Meteor命令在控制台中引发的模块“下划线” 在每一个meteor或陨石命令,如meteor或mrt create myapp ,抛出以下错误。 这个错误似乎突然出现,因为meteor在前一天晚上是function性的,从那以后没有任何改变。 Austins-MacBook-Pro:Projects austinrivas$ mrt create test-app /Users/austinrivas/.meteor/tools/3cba50c44a/tools/meteor.js:1480 }).run(); ^ Error: Cannot find module 'underscore' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:362:17) at require (module.js:378:17) at /Users/austinrivas/.meteor/tools/3cba50c44a/tools/meteor.js:10:11 我已经尝试用sudo npm install -g underscore手动sudo npm install -g underscore返回 Austins-MacBook-Pro:Projects austinrivas$ sudo npm install -g underscore Password: npm http GET https://registry.npmjs.org/underscore npm […]

Meteor.publishcallback需要在光纤中包装

无论何时客户端重新加载/断开页面,我都会收到以下错误消息。 但是,当我删除涉及集合myCollection.insert(data)这部分代码时,该错误消失。 这里发生了什么? 似乎没有非meteor库参与.. 服务器/ publications.js Meteor.publish('mySubscription', function() { this._session.socket.on('close', function() { myCollection.insert(data) // removing this line avoids the error }); return mySubscription.find(); }); 错误 packages/mongo-livedata.js:3022 throw e; ^ Error: Meteor code must always run within a Fiber. Try wrapping callbacks that you pass to non-Meteor libraries with Meteor.bindEnvironment. at Object.Meteor.bindEnvironment (packages/meteor/dynamics_nodejs.js:65) at null.<anonymous> (packages/meteor/helpers.js:108) […]