根据他们的指南,我遵循了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)


有人遇到过这个问题吗?

最佳答案

这是一个玉器问题,而不是Everyauth问题。

解:
更改:

102|       input(type='submit') Login


至:

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


参考链接:


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

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

10-09 20:12