【发布时间】:2015-12-29 23:16:03
【问题描述】:
我需要为我的登录和注册功能设置电子邮件确认/验证。我在 github 上找到了 Activator,它被认为是一种处理 nodejs 应用程序的用户激活和密码重置的简单方法 (https://github.com/deitch/activator)。我已经阅读了文档,但根本无法让简单的 example.js 工作。我不明白这个错误..任何帮助将不胜感激。
throw new Error('Most middleware (like ' + name + ') is no longer bundle
^
Error: Most middleware (like bodyParser) is no longer bundled with Express and must be installed separately. Please see https://github.com/senchalabs/connect#middleware.
at Function.Object.defineProperty.get (/Users/user/Desktop/activator-master/node_modules/express/lib/express.js:99:13)
at Object.<anonymous> (/Users/user/Desktop/activator-master/example.js:139:16)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
1 Oct 12:16:29 - [nodemon] app crashed - waiting for file changes before starting...
【问题讨论】:
-
您是否阅读了错误信息? “大多数中间件(如 bodyParser)不再与 Express 捆绑,必须单独安装。请参阅github.com/senchalabs/connect#middleware。”
-
是的,我查看了这个存储库.. 不确定它有什么帮助??
-
你做到了吗?
-
我已经阅读了文档,并假设我必须更改这一行..
-
app.use(express.bodyParser());但目前尚不清楚语法应该是什么样子。非常感谢您在正确方向上的任何帮助
标签: javascript node.js email express confirmation