5

我正在尝试通过 Heroku 将我的第一个 Web 应用程序(MeteorJS 框架中的 Telescope 版本)部署到来自 Amazon Linux AMI 2013.09.2 实例的自定义子域。我正在关注本教程 - http://satishgandham.com/2013/12/a-complete-guide-to-install-production-ready-telescope-on-your-own-server/ - 但是一旦我尝试使用 运行 Telescope PORT=3000 MONGO_URL=mongodb://localhost:3000/Telescope ROOT_URL=http://ec2-54-193-42-229.us-west-1.compute.amazonaws.com node client/main.js,我收到以下错误消息:Error: Cannot find module '/home/ec2-user/bundle/programs/server/node_modules/fibers/client/main.js'

我试图解决这个问题的方法是对最初位于目录中cp || mv的文件执行到目录甚至'/home/ec2-但我似乎无法与目录分开。我不确定这是否是问题所在,或者是否存在其他一些潜在问题,但我想在此时找到使用代理服务器的解决方法。我认为将文件移出目录就足够了,但显然不是。我不确定是否有必要继续尝试使用代理,但如果有修复,我不介意了解它。main.js~/Telescope/client/home/ec2-user/bundle/programs/serveruser/bundle/programs/server/node_modules/fibersmain.js/clientmain.js/client

或者,如果有人可以指导我如何 - https://github.com/aldeed/deploymeteor/ - 可能是使用 NGINX 服务器代理的潜在解决方法,您的帮助将不胜感激。

错误

4

1 回答 1

0

您收到错误是因为您没有从主文件夹运行命令。

你在 bundle/programs/server/node_modules/fibers。

对 client/main.js 使用绝对路径,或者 cd 到 ~

MONGO_URL=mongodb://localhost:3000/Telescope ROOT_URL=http://ec2-54-193-42-229.us-west-1.compute.amazonaws.com node client/main.js

PS:如果您在帖子本身而不是在这里提出问题,将对其他人有所帮助

于 2013-12-21T10:41:22.680 回答