node.js - everyauth 密码示例错误

标签 node.js express authorization everyauth

根据他们的指南,我遵循了 everyauth 的安装: http://everyauth.com/#installation

我正在尝试运行密码示例, 但在我运行服务器并在浏览器中转到 localhost:3000 后,我收到此错误:

    Error: \workspace\test\node_modules\everyauth\example\views\home.jade:102
    100|       label(for='openid_identifier') OpenID Identifier:  
    101|       input(type='text', name='openid_identifier')
  > 102|       input(type='submit') Login
    103| - else
    104|   h2 Authenticated
    105|   - if (everyauth.facebook)

input is self closing and should not have content.
    at Object.Compiler.visitTag (\workspace\test\node_modules\jade\lib\compiler.js:455:32)
    at Object.Compiler.visitNode (\workspace\test\node_modules\jade\lib\compiler.js:222:37)
    at Object.Compiler.visit (\workspace\test\node_modules\jade\lib\compiler.js:209:10)
    at Object.Compiler.visitBlock (\workspace\test\node_modules\jade\lib\compiler.js:292:12)
    at Object.Compiler.visitNode (\workspace\test\node_modules\jade\lib\compiler.js:222:37)
    at Object.Compiler.visit (\workspace\test\node_modules\jade\lib\compiler.js:209:10)
    at Object.Compiler.visitTag (\workspace\test\node_modules\jade\lib\compiler.js:464:12)
    at Object.Compiler.visitNode (\workspace\test\node_modules\jade\lib\compiler.js:222:37)
    at Object.Compiler.visit (\workspace\test\node_modules\jade\lib\compiler.js:209:10)
    at Object.Compiler.visitBlock (\workspace\test\node_modules\jade\lib\compiler.js:292:12)

有人遇到过这个问题吗?

最佳答案

这是一个 jade 问题,而不是 everyauth 问题。

解决方案: 变化:

102|       input(type='submit') Login

致:

102|       input(type='submit',value='Login')

引用链接:

  1. input tag docs, showing the tag is a void (self-closing) element
  2. Jade docs on tags, self-closing
  3. Jade attribute examples
  4. input is self closing and should not have content
  5. error: input is self closing and should not have content

关于node.js - everyauth 密码示例错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24146232/

相关文章:

node.js - 如何在 Mongoose 上使用 "LIKE"运算符?

javascript - 将for循环数据放入数组

javascript - 有人可以帮我从我的 Db Sequelize 中删除记录吗?

swift - LocalNotification警报干扰

用于 Ruby on Rails 的 Java 授权库,如 "CanCan"

javascript - 使用angularjs将数据从express Node 发布到mongodb

ios - Node.js/Express 忽略 iOS JSON POST

reactjs - 如何将http-proxy-middleware与react和passport.js一起使用

javascript - AWS 上的 Node js Web 应用程序无法查找无法在 View 目录 "pages/home"中查找 View "/var/app/views"

使用 PAT(个人访问 token )进行 Git 推送