typescript - 意图处理程序失败并出现错误:位置 1 处 JSON 中的意外标记 o
问题描述
当我更新@google/local-home-sdk
到时1.1.0
,构建代码并部署到 firebase。配置如下:
{
"dependencies": {
"@google/local-home-sdk": "^1.1.0",
"array.prototype.flatmap": "^1.2.3",
"cbor": "^5.0.2",
"opc": "^1.1.3",
"xmldom": "^0.3.0",
"crypto-js": "^3.2.0"
},
"devDependencies": {
"ava": "^2.1.0",
"c8": "^5.0.1",
"firebase-tools": "^8.1.1",
"html-webpack-plugin": "^3.2.0",
"ts-loader": "^6.0.2",
"ts-node": "^8.2.0",
"tslint": "^5.17.0",
"typescript": "^3.5.1",
"webpack": "^4.32.2",
"webpack-cli": "^3.3.2",
"webpack-dev-server": "^3.5.1"
}
}
当我在本地控制设备时,会发生错误:
smarthome_sdk.js:135 [ 4.162s] [smarthome.DeviceManager] Intent handler failed with error: Unexpected token o in JSON at position 1
smarthome_sdk.js:135 [ 4.168s] [smarthome.DeviceManager] Got a rejected promise Unexpected token o in JSON at position 1
为什么?有什么我想念的设置吗?
谢谢你。BR,杰克利
解决方案
推荐阅读
- javascript - 计算Javascript中按钮按下之间的经过时间
- forms - symfony 3.4将变量传递给树枝中的模态
- java - 级联持久化一个 java.util.Map
使用@ElementCollection - influxdb - 是否可以仅从 influxDb 查询中检索时间戳
- sql-server - 在运行之前验证批处理 - SET NOEXEC 仅适用于 DML 命令
- dashboard - React-Admin 如何更改菜单中的“仪表板”名称
- java - 为什么使用以下程序在 Eclipse 的控制台中没有得到任何响应?
- asp.net - ASP.NET_SessionId cookie 在特定服务器上的请求之间消失
- export - 如何避免导出 org-mode header 标题
- c++ - 调用 moveToThread 后 QSound::play 不起作用