我正在尝试通过 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/ - 但是一旦我尝试使用 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
运行 Telescope ,我收到此错误消息:Error: Cannot find module '/home/ec2-user/bundle/programs/server/node_modules/fibers/client/main.js'
我试图解决这个问题的方法是 cp || mv
在文件 main.js
最初位于 ~/Telescope/client
目录转到 /home/ec2-user/bundle/programs/server
目录甚至 '/home/ec2- user/bundle/programs/server/node_modules/fibers
但我似乎无法分开 main.js
来自 /client
目录。我不确定这是否是问题所在,或者是否存在其他一些潜在问题,但我想在此时找到使用代理服务器的解决方法。我以为移动main.js
文件出/client
目录就足够了,但显然不是。我不确定是否有必要继续尝试使用代理,但如果有修复,我不介意了解它。
或者如果有人可以指导我如何做到这一点 - https://github.com/aldeed/deploymeteor/ - 可能是使用 NGINX 服务器代理的潜在解决方法,非常感谢您的帮助。
最佳答案
您收到错误是因为您没有从主文件夹运行命令。
你在 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:如果您在帖子本身而不是在这里提出问题,将对其他人有所帮助
关于heroku - 使用 NGINX 服务器从 Amazon Linux AMI 2013.09.2 实例部署 Meteor 应用程序接收模块错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20712542/