本文介绍了使流星0.9.2生成以运行OSX->的Linux的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是流星0.8.x,但最近尝试升级到0.9.2.它可以在本地运行,但是我对meteor bundlemeteor build

I was using meteor 0.8.x but recently tried to upgrade to 0.9.2. It works locally but I'm not having any luck with meteor bundle or meteor build

首先我遇到了这个错误

/var/projects/myproject/live/bundle/programs/server/boot.js:198
}).run();
   ^
Error: /var/projects/myproject/live/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt/build/Release/bcrypt_lib.node: invalid ELF header
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at bindings (/var/projects/myproject/live/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt/node_modules/bindings/bindings.js:74:15)
    at Object.<anonymous> (/var/projects/myproject/live/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt/bcrypt.js:1:97)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

我尝试过的事情

  • 在开始之前确保live/bundle/programs/server/node_modules不存在.
  • 按照自述文件所述在live/bundle/programs/server中运行npm install
  • Made sure live/bundle/programs/server/node_modules does not exist before starting.
  • ran npm install in live/bundle/programs/server as the README says to

我注意到的事情. live/bundle/programs/server/package.json中没有bcrypt部门.在0.8.2中,我有手动安装fibersbcrypt的命令,但是显然我不再需要光纤了.看起来我确实需要bcrypt,但是它所处的位置与以前不同.

Things I noticed. There's no bcrypt deps in live/bundle/programs/server/package.json. In 0.8.2 I had commands to install both fibers and bcrypt manually but apparently I don't need the fibers one anymore. It looks like I do need the bcrypt one but it's in a different location than it used to be.

我在文档中没有看到有关需要转到/var/projects/myproject/live/bundle/programs/server/npm/npm-bcrypt并安装bcrypt的任何内容.我可以手动删除它,但是我做错了什么吗?

I don't see anything in the docs about needing to go to /var/projects/myproject/live/bundle/programs/server/npm/npm-bcrypt and install bcrypt. I can manually delete it but am I doing something wrong?

就像我说的那样,我已经将它安装在programs/server中0.8.2需要它的地方.我应该在program/server/npm/npm-bcrypt中手动安装吗?我应该将其添加到我要忽略的地方列表中吗

Like I said I'm already installing it where 0.8.2 needed it in programs/server. Should I be manually installing in program/server/npm/npm-bcrypt? Should I add that to my list of places to ignore

我只是尝试尝试一下,所以现在我得到了这个错误

I put that in just to try it and so now I get this error

/var/projects/myproject/live/bundle/programs/server/node_modules/fibers/future.js:173
                        throw(ex);
                              ^
Error: Cannot find module 'websocket-driver'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/var/projects/myproject/live/bundle/programs/server/npm/ddp/node_modules/faye-websocket/lib/faye/websocket.js:8:14)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

这是我还需要手动安装的另一个模块吗?我的印象是我在做根本上是错误的事情.

Is that yet another module I need to manually install? I'm getting the impression I'm just doing something fundamentally wrong.

我有以下流星包

.meteor/包裹

.meteor/packages

# Meteor packages used by this project, one per line.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

standard-app-packages
audit-argument-checks
iron:[email protected]
meteorhacks:[email protected]

npm-container

packages.json

packages.json

{
  "semver": "2.3.1",
  "winston": "0.7.3",
  "winston-loggly": "1.0.1"
}

注意:我正在OSX上进行开发/捆绑,但是在Ubuntu上进行了部署.

note: I'm developing/bundling on OSX but deploying on Ubuntu.

推荐答案

我也遇到了类似的问题-我在DO上发布了解决方案

I had similar problems - I posted my solution over on DO

https://www.digitalocean.com/community/tutorials/how-to-deploy-a-meteor-js-application-on-ubuntu-14-04-with-nginx?comment= 19780

更新-这是该论坛的答案:

UPDATE - Here is the answer from that forum:

如果其他任何人都遇到了bcrypt这样的问题-该应用可能具有自己的副本/home/yourapp/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt/

If anyone else has an issue like this with bcrypt - the app probably has its own copy in /home/yourapp/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt/

删除该噪音.然后执行此操作.

delete that noise. Then do this.

cd /home/yourapp/bundle/programs/server

npm install bcrypt

然后

cp -r /home/yourapp/bundle/programs/server/node_modules/bcrypt /home/yourapp/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt/

然后启动您的应用程序并享受美味佳肴.

then start your app and enjoy the meteory goodness.

这篇关于使流星0.9.2生成以运行OSX->的Linux的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-14 17:58