【问题标题】:Meteor site locks up when trying to add new account尝试添加新帐户时 Meteor 站点锁定
【发布时间】:2019-07-19 10:48:25
【问题描述】:

我最近将基于 Meteor 的网站从 1.3 更新到了 1.8,同时包括了 Let's Encrypt SSL。当我在使用 MUP 部署后尝试添加新用户时,用于添加用户的 UI 折叠为三个频闪条,但从未完成。当我尝试在另一个浏览器中运行该页面时,它会给我一个 502 Bad Gateway 错误。当我刷新尝试创建帐户的原始页面时,此 502 错误就会消失。

我使用提供的“交钥匙”帐户进行构建。在我的家用计算机上进行本地测试时效果很好。

这是所有安装包,包括删除不安全后的默认包:

meteor-base@1.4.0             # Packages every Meteor app needs to have
mobile-experience@1.0.5       # Packages for a great mobile UX
mongo@1.6.2                   # The database Meteor supports right now
blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views
reactive-var@1.0.11            # Reactive variable for tracker
tracker@1.2.0                 # Meteor's client-side reactive programming library

standard-minifier-css@1.5.3   # CSS minifier run for production mode
standard-minifier-js@2.4.1    # JS minifier run for production mode
es5-shim@4.8.0                # ECMAScript 5 compatibility for older browsers
ecmascript@0.12.4              # Enable ECMAScript2015+ syntax in app code
shell-server@0.4.0            # Server-side component of the `meteor shell` command

alexwine:bootstrap-4
oauth
iron:router
accounts-ui
accounts-password
accounts-facebook
accounts-google
session
underscore
facebook-config-ui
google-config-ui

而且这是运行股票账户,没有特殊代码。我已经在 J​​avaScript 文件的客户端设置了用户名和电子邮件的登录:

Accounts.ui.config({
  passwordSignupFields: "USERNAME_AND_EMAIL"
});

真正令人沮丧的是,当我的网站在我的本地机器上运行以根据需要进行测试、添加和更新用户时运行良好,但由于某种原因在部署时却陷入了困境。

我很迷茫,我什至不知道是什么导致它如此严重地挂起。非常感谢任何帮助!

编辑:添加 package.json

{
  "name": "DMachineWordBank",
  "private": true,
  "scripts": {
    "start": "meteor run",
    "test": "meteor test --once --driver-package meteortesting:mocha",
    "test-app": "TEST_WATCH=1 meteor test --full-app --driver-package meteortesting:mocha",
    "visualize": "meteor --production --extra-packages bundle-visualizer"
  },
  "dependencies": {
    "@babel/runtime": "^7.3.4",
    "bcrypt": "^3.0.6",
    "meteor-node-stubs": "^0.4.1",
    "popper.js": "^1.15.0"
  },
  "meteor": {
    "mainModule": {
      "client": "client/main.js",
      "server": "server/main.js"
    },
    "testModule": "tests/main.js"
  }
}

【问题讨论】:

  • 您在创建新用户时是否在服务器上看到错误?您还可以更新您的帖子以包含 package.json。
  • 我添加了 package.json 文件。使用 mup 后,我很难找到错误存储在服务器端的位置。在重新启动之前,我可以从 Docker 获得的唯一错误消息是“节点:符号查找错误:/bullt_app/programs/server/npm/node_modules/bcrypt/lE”。
  • 你可以从你的mup目录运行mup logs -f --tail=100来查看日志。

标签: meteor mup


【解决方案1】:

如果您删除 bcrpt 并忽略以下消息,它会修复生产吗?

Note: you are using a pure-JavaScript implementation of bcrypt.
While this implementation will work correctly, it is known to be
(STDERR) approximately three times slower than the native implementation.
In order to use the native implementation instead, run

    meteor npm install --save bcrypt

in the root directory of your application.

【讨论】:

  • 我以前做过,现在使用 bcrypt@3.0.6 运行,但我仍然遇到问题。
  • 好的,这让我走上了正确的道路,谢谢!我的解决方案基本上是回滚到 v0.8.6。现在我至少可以创建帐户了。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2015-05-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多