无法安装谷歌云功能模拟器

时间:2019-04-20 22:42:03

标签: firebase npm google-cloud-platform google-cloud-functions

我正在尝试将Firebase更新到最新版本,并遇到错误。这使我注意到函数模拟器有问题:

$ npm install @google-cloud/functions-emulator
npm ERR! Unexpected end of JSON input while parsing near '..."retry-request":"^4.0'

这是在Firebase最近更新之后发生的。我是在做错什么还是应该报告此错误?

尝试了多种解决方案,包括完全卸载npm,node甚至vsc。更新npm,尝试专门安装云功能仿真器...在某些依赖文件中始终存在相同的错误。

这里是error log

88 error Unexpected end of JSON input while parsing near '..."retry-request":"^4.0'

我只是想将Firebase更新到最新版本。现在一切都坏了:D

非常感谢您的帮助。

1 个答案:

答案 0 :(得分:1)

由于文件下载损坏(尝试在火车上安装Firebase更新)而发生的错误。

解决:

npm cache clean --force

然后重新安装软件包。

相关问题