【发布时间】:2017-02-10 03:32:20
【问题描述】:
我正在学习如何使用 WebSharper。实际上,我没有学习如何使用 WebSharper。
我想学习如何构建一个简单的 SPA,所以我关注了this tutorial from the WebSharper page。我可以使用 Visual Studio 和 Zafir(测试版 WebSharper 4.0 的代号)创建 SPA。我遵循了教程中的每一步。我创建了一个repo on github that is everything in the SPA.
项目不会构建。更具体地说,在Client.fs file,我得到编译器错误
The value or constructor P is not found
在第 10 行中使用 P,在第 11 行中使用 Div 出现相同的错误,在第 18 行中出现错误
Namesapces cannot contain values. Consider using a module to hold your value declrations.
使用Run(),但当我尝试将[<SPAEntryPoint>] 信息移动到module HelloWorld 时,出现错误
Lookup on object of indeterminate type based on information prior to this program point. A type annotation...
结果,当我尝试构建这个项目时,构建失败了。
为什么会出现这些错误?本教程与 WebSharper 的其余部分是否过时?我该怎么做才能让一个简单的教程正常工作?
编辑:当我使用 WebSharper v3.x 时,我也会遇到同样的错误。
【问题讨论】:
标签: f# websharper