2015-08-15 34 views
0

我从我的本地机器上工作的my dev meteor项目目录中创建了tar.gz文件,但tar.gz的提取文件在ec2上不工作。它显示以下错误。流星代码在ec2上不能工作

W20150815-19:56:58.515(0)? (STDERR) 
W20150815-19:56:58.516(0)? (STDERR) /home/ubuntu/.meteor/packages/meteor-tool/.1.1.3.1md4rq1++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245 
W20150815-19:56:58.517(0)? (STDERR)       throw(ex); 
W20150815-19:56:58.518(0)? (STDERR)        ^
W20150815-19:56:58.522(0)? (STDERR) Error: Cannot find module 'elasticsearch' 
W20150815-19:56:58.522(0)? (STDERR)  at Function.Module._resolveFilename (module.js:338:15) 
W20150815-19:56:58.522(0)? (STDERR)  at Function.Module._load (module.js:280:25) 
W20150815-19:56:58.522(0)? (STDERR)  at Module.require (module.js:364:17) 
W20150815-19:56:58.522(0)? (STDERR)  at require (module.js:380:17) 
W20150815-19:56:58.522(0)? (STDERR)  at Object.Npm.require (/home/ubuntu/snapstall/.meteor/local/build/programs/server/boot.js:130:18) 
W20150815-19:56:58.523(0)? (STDERR)  at app/server/elastic.js:1:60 
W20150815-19:56:58.523(0)? (STDERR)  at app/server/elastic.js:59:3 
W20150815-19:56:58.523(0)? (STDERR)  at /home/ubuntu/snapstall/.meteor/local/build/programs/server/boot.js:222:10 
W20150815-19:56:58.523(0)? (STDERR)  at Array.forEach (native) 
W20150815-19:56:58.523(0)? (STDERR)  at Function._.each._.forEach (/home/ubuntu/.meteor/packages/meteor-tool/.1.1.3.1md4rq1++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11) 
+0

您是否在服务器上安装了弹性搜索模块? – shadeglare

+0

yes .... npm install -g elasticsearch –

+0

您是否使用与安装npm软件包时相同的用户来运行meteor?另外,当你在节点中尝试require('elasticsearch')时会发生什么? –

回答

1

您的应用程序的所有NPM依赖性内位于您包的programs/server子目录package.json声明。为确保它们全部解决,您需要运行

npm install 

拆包归档后的子目录中。

它没有自动完成的原因是要有一个较小的尺寸包,并确保npm安装与目标系统架构相匹配的二进制文件(如果有的话),这可能不一定与您的系统架构相同创建捆绑包。