简体   繁体   中英

Unnown token spread operator on Heroku, locally working

I'm quite surprised seeing that when I deployed my express app to heroku the error occurs SyntaxError: Unexpected token ... , indeed I use spread operator and it work when running locally. For some reason I can see the error in heroku logs which crashes my app. Any ideas?

8.2.1之前,节点不支持 Spread 尝试更新您的节点版本

我在我的评论中向您询问 Node 版本的原因是因为在节点8.2.1上引入了扩展运算符,所以如果 Heroku 使用8.1.1版本,正如您在评论中告诉我的那样,那么这应该会导致错误。

您需要更新您的节点版本,节点版本 8.1.1 不支持此操作符。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM