如果我包含这行代码,我的Google Cloud Function将不会上传,它来自docs
const {Translate} = require('@google-cloud/translate').v2;错误是
TypeError: Cannot read property 'Reader' of undefined我的代码中没有Reader。
我的版本是:
npm -v @google-cloud/translate
6.14.10这很奇怪,因为current npm version是6.0.5,而release notes表示,自2020年3月以来就没有更新过。
我为Firebase Cloud Functions引擎尝试了Node 10和Node 12,同样的错误。
我得到这个错误是因为我在黑洞的事件视界上,并且下载了@google-cloud/translate的未来版本吗?我想我可能置身于另一个宇宙,2020年太可怕了。你的宇宙里的东西怎么样了?
发布于 2021-01-06 04:59:11
我更新了/functions目录中的npm模块,错误消息消失了。firebase-functions和@google-cloud/translate都已经过时了。
https://stackoverflow.com/questions/65583117
复制相似问题