我正在尝试使用Fable.Axios向我的服务器提交请求。我的F#代码可以编译,但是当我尝试在浏览器中加载页面时,我在编译的JS代码中遇到了编译错误:
Failed to compile
./fable-include/fable-bundle.js
TypeError: C:\Users\jaydp\Documents\Github\FunctionalCrudForms\node\fable-include\fable-bundle.js: Property left of AssignmentExpression expected node to be of a type ["LVal"] but instead got "BooleanLiteral"
错误消息未列出行号!因此,我无法调查编译后的代码。
这是导致JS编译错误的F#方法:
let fetchWithAxios url =
axios.get(url)
|> Promise.map parseResponse
|> Promise.catchAxios catchAxiosError
有人可以帮我解决这个问题吗?
我的代码:https://github.com/jaydpather/FunctionalCrudForms(请参阅文件夹“寓言”和“节点”)。