xuezier / egg-apollo-client

16 stars 6 forks source link

Cannot read property 'content-type' of undefined #18

Closed Sayen0 closed 3 years ago

Sayen0 commented 3 years ago

hi,请教下 我在egg 项目的中引用的版本入下 "@gaoding/egg-apollo-client": "^2.0.3", typescript版本为"^3.0.0" 运行 yarn run dev 会报TypeError: Cannot read property 'content-type' of undefined错误,

但是如果"@gaoding/egg-apollo-client":"^1.4.0"则是可以运行 我们最新的egg-apollo-client版本在ts环境下该如何解决上面的问题吖

xuezier commented 3 years ago

方便的话贴一下启动报错截图哈

XcGuaN-miepia commented 3 years ago

我也遇到了同样的问题,我排查了一下是在config.apollo中的config_server_url没有加 http://,加上了之后这个报错就没有了

xuezier commented 3 years ago

fixed in: v2.0.5

yiyi17 commented 2 years ago

Cannot read property 'content-type' of undefined, "@gaoding/egg-apollo-client": "^2.0.5", 仍然存在

xuezier commented 2 years ago

Cannot read property 'content-type' of undefined, "@gaoding/egg-apollo-client": "^2.0.5", 仍然存在

贴下配置,和具体的错误堆栈信息