2015-08-15 35 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安裝與目標系統架構相匹配的二進制文件(如果有的話),這可能不一定與您的系統架構相同創建捆綁包。