微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何解决 TypeError: Object prototype may only be an Object or null: undefined in @google-cloud/storage with Angular?

如何解决如何解决 TypeError: Object prototype may only be an Object or null: undefined in @google-cloud/storage with Angular?

我安装了 npm i @google-cloud/storage。 首先,我遇到了许多无法解决错误,例如加密、fs、http、https、net、path、os、constants、child_process、stream、tls、zlib。这些问题已通过以下方式解决

"browser": {
    "zlib": false,"tls": false,"stream": false,"path": false,"os": false,"net": false,"https": false,"fs": false,"crypto": false,"constants": false,"child_process": false,"http": false
  }

但现在我收到此错误

Uncaught (in promise) TypeError: Object prototype may only be an Object or null: undefined
    at Function.create (<anonymous>)
    at Object.inherits (inherits_browser.js:5)
    at Object.ocFe (data-stream.js:39)
    at __webpack_require__ (bootstrap:79)
    at Object.bDwd (sign-stream.js:3)
    at __webpack_require__ (bootstrap:79)
    at Object.M+8A (index.js:2)
    at __webpack_require__ (bootstrap:79)
    at Object.9EfD (index.js:12)
    at __webpack_require__ (bootstrap:79)

在另一个问题中,答案已经写到它应该更新@angular/cli,编译器,核心。我这样做了,但错误并没有消失。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。