将流星部署到官方流星服务器光纤 [英] Deploy meteor to official meteor servers fibers
问题描述
这里已经有一些与此问题相关的问题。
There are already a few questions around here related to this question.
我想将meteorjs应用程序部署到官方流星服务器。我的应用程序使用光纤,并且由于光纤是为我的系统(Mac OSX)编译的,因此流星会在ubuntu服务器上创建错误。
I want to deploy a meteorjs app to the official meteor servers. My application uses fibers, and since fibers is compiled for my system ( Mac OSX ) it creates an error on the ubuntu servers by meteor.
其他问题/答案是相关的将应用程序部署到官方流星服务器以外的其他地方,或者由于对我不起作用而显得有些退步。
The other questions/answers are related to deploying the app somewhere else than the official meteor servers or they seem to leave a step out, since they don't work for me.
一些相关文章是这些
是否在Modulus.io上为Meteor应用程序重新安装节点光纤?
我要使用:
meteor deploy myapp.meteor.com
编辑:
不幸的是,我的上述问题并未完成,我使用的是Future,它是纤维的一部分。当我将其部署到流星并访问服务器日志时,我得到这些警告,并且应用程序随后立即崩溃。
My question above was not complete unfortunately, I use Future, which is part of fibers. When I deploy it to meteor and access the server logs, I get these WARNINGs and the applications crashes right after.
警告/meteor/dev_bundles/0.3.13/lib/ node_modules / fibers / future.js:173
WARNING /meteor/dev_bundles/0.3.13/lib/node_modules/fibers/future.js:173
警告错误:找不到模块'fibers / Future'
WARNING Error: Cannot find module 'fibers/Future'
在我的代码中,这行代码是:
In my code I have the line:
Future = Npm.require("fibers/future");
在流星部署XXX.meteor.com上不可能吗?
Is this not possible on meteor deploy XXX.meteor.com ?
编辑第二个:
而不使用:
EDIT 2nd: Instead of using:
Future = Npm.require("fibers/future");
我也尝试过:
var path = Npm.require('path');
var fs = Npm.require('fs');
var base = path.resolve('.');
var isBundle = fs.existsSync(base + '/bundle');
var modulePath = base + (isBundle ? '/bundle/static' : '/public') + '/node_modules';
Future = Npm.require(modulePath + '/fibers/future');
如本文所建议:
并安装光纤到:
.meteor / local / build / programs / server / public / node_modules /
.meteor/local/build/programs/server/public/node_modules/
但是在没有sudo
的流星运行时,我得到了这个错误:EACCES,权限被拒绝'XXXX / .meteor / local / build'
at Object.fs.renameSync(fs.js:439:18)
But with this I get either this when running meteor without sudo Error: EACCES, permission denied 'XXXX/.meteor/local/build' at Object.fs.renameSync (fs.js:439:18)
运行时出现此错误sudo:
错误:找不到模块'XXXX / .meteor / local / build / programs / server / public / node_modules / fibers / future'
Or this error, when running it with sudo: Error: Cannot find module 'XXXX/.meteor/local/build/programs/server/public/node_modules/fibers/future'
通常我不使用sudo ofc来运行流星!
Usually I run meteor without sudo ofc!
推荐答案
我的问题是我确实包含了用于加载另一个框架的npm软件包,但该软件包损坏了流星的新Npm。
My problem was that I did include the npm package for loading another framework, which broke the new Npm by meteor.
这篇关于将流星部署到官方流星服务器光纤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!