javascript - 将 meteor 应用程序部署到模数的问题

标签 javascript macos meteor deployment modulus

跟进与此类似的东西...http://stuart-85933.onmodulus.net/ 和那个确切的东西。尝试了一个小时的一堆东西,我快死了。请帮忙!

谢谢。

“无法连接到任何应用程序实例。”

这是我在 modulus 网站上的日志

npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ../../main
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs meteor-dev-bundle
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls meteor-dev-bundle
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /mnt/app/bundle/programs/server/npm-debug.log
Now using node v0.10.41 (npm v3.9.6)
Found package.json: ./bundle/programs/server/package.json
Running command: npm start

> meteor-dev-bundle@0.0.0 start /mnt/app/bundle/programs/server
> node ../../main


assert.js:93
  throw new assert.AssertionError({
        ^
AssertionError: "undefined" === "function"
    at wrapPathFunction (/mnt/app/bundle/programs/server/mini-files.js:77:10)
    at Object.<anonymous> (/mnt/app/bundle/programs/server/mini-files.js:108:24)
    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)
    at require (module.js:380:17)
    at Object.<anonymous> (/mnt/app/bundle/programs/server/boot.js:9:13)
    at Module._compile (module.js:456:26)

npm ERR! Linux 3.13.0-92-generic
npm ERR! argv "node" "/mnt/app/.modulus/nvm/v0.10.41/bin/npm" "start"
npm ERR! node v0.10.41
npm ERR! npm  v3.9.6
npm ERR! code ELIFECYCLE
npm ERR! meteor-dev-bundle@0.0.0 start: `node ../../main`
npm ERR! Exit status 8

最佳答案

Modulus 目前正在努力为一些较新的 Meteor 版本添加兼容性,即 Meteor 1.4。在下面提到的问题中可以找到有关此错误的更多信息。您可以在此处查看有关此问题的更新:meteor github issue , meteor build runtime , demeteorizer github issue

编辑:如果您仍然遇到问题,有一个解决方法,但它有点冗长。此解决方法应该适用于任何新发布的 Meteor 版本,甚至还不适用于 Meteor 运行时的版本。

  1. 确保应用在本地运行
  2. 安装任何未解析的模块 即,如果您在本地运行时收到此消息:

    Unable to resolve some modules:
    
    XYZ ...
    
    If you notice problems related to these missing modules, consider         running:
    
    
    meteor npm install --save XYZ
    
  3. 运行除流器

    $ npm install demeteorizer -g
    $ demeteorizer
    
  4. 将目录更改为 .demeteorized/bundle/programs/server/

    $ cd .demeteorized/bundle/programs/server/

  5. 在该目录中运行 npm install

    $ npm 安装

  6. 运行“npm install”后编辑该目录中的 package.json 并指定正确的节点引擎:即节点 4.4.7

  7. 将目录更改为包的根目录

    $ cd ../../

  8. 确保您位于“bundle”的根目录中,然后压缩内容

    $ pwd
    /exampleDirectory/yourProject/.demeteorized/bundle
    
    • 压缩包内容

    $ zip -r -X myProject.zip ./

  9. 将该 zip 文件移动到项目目录的根目录(或非隐藏文件夹)

  10. 前往 my.modulus.io 上的项目仪表板

    • 一个。停止你的项目
    • b。将运行时更改为 node.js “管理”面板
    • c。确认您有 MONGO_URL 和 ROOT_URL 在环境变量中指定
    • d。回到项目的“家” 仪表板,并上传/部署 zip

关于javascript - 将 meteor 应用程序部署到模数的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38680592/

相关文章:

php - 从 'Uploads' 的任何子文件夹调用图像

ruby - 使用终端打开时,我将 ruby​​ 程序放在 mac 上的什么位置

c - 在 Linux 环境下运行的 OSX 终端上编译代码很困难

macos - 更改 XAMPP 上的端口

javascript - 设置Session的变量和Meteor Streams有什么区别?

javascript - 隐藏基于多选菜单的显示文本字段

Javascript UI 库,可轻松绑定(bind)到 JSON

javascript - CSS/JavaScript/Jquery : Show/Hide a DIV Depending on one of two images being clicked

javascript - 为什么 mongodb .deny() 不起作用(Meteor)

C++将png转换为base64