获取错误:’Constants.platform.ios.model’ 已被弃用,推荐使用 expo-device。

huangapple go评论43阅读模式
英文:

Getting error 'Constants.platform.ios.model' has been deprecated in favor of expo-device

问题

"我在我的新项目Expo React Native中遇到了以下错误,请指导:
“警告 Constants.platform.ios.model 已被弃用,建议使用 expo-device 的 Device.modelName 属性。此 API 将在 SDK 45 中移除。”"

英文:

I'm getting the following error in my new project Expo React Native. please guide:
"WARN Constants.platform.ios.model has been deprecated in favor of expo-device's Device.modelName property. This API will be removed in SDK 45."

答案1

得分: 6

尝试更新到最新版本:expo-cli upgradenpm audit fix --force 这两者在我的情况下都有效。

英文:

try updating to the latest version:
expo-cli upgrade or npm audit fix --force both of these worked on my end

huangapple
  • 本文由 发表于 2023年7月17日 20:11:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/76704343.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定