Tag: 谷歌行动

在更新Node.js包之后,在Google应用的Actions上严格模式错误中使用const?

我有一个Node.JS(版本8.6)的Google Home应用程序,它使用Google Javascript客户端库上的Actions。 现在已经build成并运行好几天了。 我在项目中添加了一些软件包,并且突然间,我开始在Actions on Google Javascript客户端库中发现以下致命错误,尽pipe该库中的代码没有被触及: /** * The Actions on Google client library. * https://developers.google.com/actions/ */ 'use strict'; const AssistantApp = require('./assistant-app'); ^^^^^ SyntaxError: Use of const in strict mode. at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (/home/roschler/Documents/GitHub/YourMD/google-assistant/morse-integration/routes/fulfillment.js:16:21) at […]