如何解决 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 (将#修改为@)