Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: ios and android dev builds fail #232

Closed
1 task done
Mobu34 opened this issue May 30, 2024 · 1 comment
Closed
1 task done

[Bug]: ios and android dev builds fail #232

Mobu34 opened this issue May 30, 2024 · 1 comment

Comments

@Mobu34
Copy link

Mobu34 commented May 30, 2024

What happened?

I installed onesignal-expo-plugin by following the doc for Expo : https://documentation.onesignal.com/docs/react-native-expo-sdk-setup but at the end when I try to run npx expo run:ios or npx expo run:android, it ends with following error :

iOS Bundling failed 9980ms node_modules/expo/AppEntry.js (1903 modules)
The package at "node_modules/onesignal-expo-plugin/build/onesignal/withOneSignalAndroid.js" attempted to import the Node standard library module "path".
It failed because the native React runtime does not include the Node standard library.

Here is my package.json :

{
  "name": "stampy",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web",
    "adb": "adb reverse tcp:9090 tcp:9090"
  },
  "dependencies": {
    "@expo-google-fonts/montserrat-alternates": "^0.2.3",
    "@expo-google-fonts/righteous": "^0.2.3",
    "@expo/vector-icons": "^14.0.0",
    "@react-native-async-storage/async-storage": "1.23.1",
    "@react-native-community/datetimepicker": "^8.0.1",
    "@react-native-masked-view/masked-view": "0.3.1",
    "@react-native-picker/picker": "2.7.5",
    "@react-navigation/native": "^6.1.7",
    "@react-navigation/native-stack": "^6.9.13",
    "@reduxjs/toolkit": "^1.9.5",
    "@tanstack/react-query": "^5.32.1",
    "axios": "^1.6.8",
    "configcat-js": "^9.4.0",
    "date-fns": "^2.30.0",
    "expo": "^51.0.8",
    "expo-camera": "~15.0.9",
    "expo-constants": "~16.0.1",
    "expo-device": "~6.0.2",
    "expo-font": "~12.0.5",
    "expo-linear-gradient": "~13.0.2",
    "expo-status-bar": "~1.12.1",
    "firebase": "^10.4.0",
    "lottie-react-native": "6.7.0",
    "onesignal-expo-plugin": "^2.0.2",
    "react": "18.2.0",
    "react-hook-form": "^7.47.0",
    "react-native": "0.74.1",
    "react-native-modal": "^13.0.1",
    "react-native-modal-datetime-picker": "^17.1.0",
    "react-native-onesignal": "^5.2.0",
    "react-native-qrcode-svg": "^6.2.0",
    "react-native-safe-area-context": "4.10.1",
    "react-native-screens": "3.31.1",
    "react-native-svg": "15.2.0",
    "react-native-toast-message": "^2.2.0",
    "react-native-uuid": "^2.0.1",
    "react-native-webview": "13.8.6",
    "react-redux": "^8.1.2",
    "redux-persist": "^6.0.0",
    "styled-components": "^6.0.7"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@types/react": "~18.2.79",
    "@types/react-native": "^0.73.0",
    "@types/react-redux": "^7.1.26",
    "@types/styled-components": "^5.1.27",
    "typescript": "~5.3.3"
  },
  "private": true
}

Can you please help on this ?

Steps to reproduce?

I followed step by step the doc https://documentation.onesignal.com/docs/react-native-expo-sdk-setup
I tried with npm and yarn but same result.

What did you expect to happen?

I expected the app running without issue

OneSignal Expo SDK version

2.0.2

Platform

No response

Relevant log output

iOS Bundling failed 9980ms node_modules/expo/AppEntry.js (1903 modules)
The package at "node_modules/onesignal-expo-plugin/build/onesignal/withOneSignalAndroid.js" attempted to import the Node standard library module "path".
It failed because the native React runtime does not include the Node standard library.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Mobu34 Mobu34 closed this as completed May 30, 2024
@Mobu34
Copy link
Author

Mobu34 commented May 30, 2024

My bad I was trying to import OneSignal from onesignal-expo-plugin instead of react-native-onesignal
Sorry for this useless issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant