everyauth密码示例错误

时间:2014-06-10 16:27:55

标签: node.js express authorization 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)

有人有这个问题吗?

1 个答案:

答案 0 :(得分:2)

这是一个玉问题,而不是每个问题。

<强>解决方案: 变化:

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