在更新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 Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) 

我从来没有得到过这个错误。 以下是我的package.json文件:

 { "name": "test", "version": "0.0.0", "private": true, "scripts": { "start": "node ./bin/www" }, "dependencies": { "aws-sdk": "^2.3.17", "actions-on-google": "^1.4.0", "archiver": "^1.3.0", "body-parser": "~1.13.3", "bluebird": "^3.4.0", "cookie-parser": "~1.3.5", "config": "^1.21.0", "debug": "~2.2.0", "express": "~4.13.1", "glob": "~7.0.3", "http-status-codes": "~1.0.6", "jade": "~1.11.0", "jsonfile": "~2.2.3", "marked": "^0.3.5", "morgan": "~1.6.1", "pg": "^6.1.4", "redis": "^2.6.1", "request": "^2.72.0", "scribe-js": "~2.0.4", "serve-favicon": "~2.3.0", "showdown": "^1.7.1", "simple-spinner": "0.0.5", "ssl-root-cas": "~1.2.2", "underscore": "^1.8.3" } } 

有谁知道这是为什么发生,我能做些什么来解决它? 我试图更新我的Node.JS版本按照接受的答案堆栈溢出后,有关类似的错误,但它没有帮助:

SyntaxError:在严格模式下使用const?

我仍然得到错误。

更新 :我忘了我也从节点7.2升级到8.6。 我相信现在是什么原因造成我的问题。 我正在做一个完整的清除Node.js,然后安装nvm,所以我可以testing版本的过程。