最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Property SetImmediate doesnt exist in react native expo - Stack Overflow

programmeradmin0浏览0评论

(.png)

I tried adding setImmediate property manually but it didn't work.

I am using react native expo and I have also updated expo sdk to 52 may be this error is because of that.

this is my package.json file:
{
  "name": "contactless_send",
  "version": "2.0.1",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@expo/vector-icons": "^14.0.4",
    "@react-native-async-storage/async-storage": "1.23.1",
    "@react-native-picker/picker": "^2.11.0",
    "expo": "^52.0.15",
    "expo-font": "^12.0.10",
    "expo-status-bar": "~1.12.1",
    "nativewind": "^2.0.11",
    "react": "18.2.0",
    "react-native": "^0.77.1",
    "react-native-app-intro-slider": "4.0.4",
    "react-native-keyboard-aware-scroll-view": "^0.9.5"
  },
  "devDependencies": {
    "@babel/core": "^7.24.0",
    "@react-native-community/cli": "^16.0.0",
    "tailwindcss": "3.3.2"
  },
  "private": true
}

I have also tried installing this package npm install react-native-polyfill-globals but it didn't work too.

(https://i.sstatic/M9MM2ipB.png)

I tried adding setImmediate property manually but it didn't work.

I am using react native expo and I have also updated expo sdk to 52 may be this error is because of that.

this is my package.json file:
{
  "name": "contactless_send",
  "version": "2.0.1",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@expo/vector-icons": "^14.0.4",
    "@react-native-async-storage/async-storage": "1.23.1",
    "@react-native-picker/picker": "^2.11.0",
    "expo": "^52.0.15",
    "expo-font": "^12.0.10",
    "expo-status-bar": "~1.12.1",
    "nativewind": "^2.0.11",
    "react": "18.2.0",
    "react-native": "^0.77.1",
    "react-native-app-intro-slider": "4.0.4",
    "react-native-keyboard-aware-scroll-view": "^0.9.5"
  },
  "devDependencies": {
    "@babel/core": "^7.24.0",
    "@react-native-community/cli": "^16.0.0",
    "tailwindcss": "3.3.2"
  },
  "private": true
}

I have also tried installing this package npm install react-native-polyfill-globals but it didn't work too.

Share Improve this question asked Feb 21 at 3:07 AnmolAnmol 11 silver badge
Add a comment  | 

1 Answer 1

Reset to default 1

So I had this same issue and after some research. I find the fix to be manually installing setimmediate package.

npm i setimmediate

Then import it in the index.ts file. Also it should be the first import in the file

import 'setimmediate'

for reference check here https://github/software-mansion/react-native-reanimated/issues/4140

发布评论

评论列表(0)

  1. 暂无评论