pendo-io / pendo-mobile-sdk

Pendo captures product usage data, gathers user feedback, and lets you communicate in-app to onboard, educate, and guide users to value
https://www.pendo.io
Other
58 stars 2 forks source link

React native sdk upgrade to 2.19 #23

Closed kristinadarroch closed 1 year ago

kristinadarroch commented 1 year ago

Whenever I upgrade (to 2.19.0 from 2.180.0) I go through all the steps and I keep getting this error.

I go through all the steps and still run into it, I even got another coworker to try it on his end and he is still getting the same error. (this error is after a pod install)

error: Error: Unable to resolve module react/jsx-runtime from /Users/kdarroch/frontend/VisionNxMobile/node_modules/rn-pendo-sdk/lib/pendoRN.js: react/jsx-runtime could not be found within the project or in these directories:

node_modules/rn-pendo-sdk/node_modules

node_modules

../node_modules

If you are sure the module exists, try these steps:

  1. Clear watchman watches: watchman watch-del-all

  2. Delete node_modules and run yarn install

  3. Reset Metro's cache: yarn start --reset-cache

  4. Remove the cache: rm -rf /tmp/metro-*

MikePendo commented 1 year ago

@kristinadarroch strange do u indeed see the module in node_modules?

MikePendo commented 1 year ago

Checking on my local

MikePendo commented 1 year ago
npx react-native init SampleAppClean
yarn add rn-pendo-sdk
cd ios
pod install --repo-update

importing the following import {withPendoRN, PendoSDK, NavigationLibraryType} from "rn-pendo-sdk"; in App.js Running the app in Xcode (14.0.1) simulator , running as expected. Maybe delete the node_module and install again. If nothing else helps please share sample project I will have a look what might the issue

kristinadarroch commented 1 year ago
image

i am seeing the node modules for this, i have deleted node modules several times and tried to rebuild and still getting the same error

MikePendo commented 1 year ago

is it an expo project?

kristinadarroch commented 1 year ago

it is not an expo project

MikePendo commented 1 year ago

if u remove the import of Pendo does it compiles? the 2.18 were running with no issues? Do u run it from terminal or Xcode ? (can u try both ways) When u delete all the cache did u kill the Metro? (by killing the terminal) Did u run pod install? Did u try to delete the app and reinstall it? if u create a new project like I did and add pendo will u be able to run it? I mean u definitely see the module so I am not sure why it doesnt recognize it

kristinadarroch commented 1 year ago

we were running into no issues, on 2.18 - i removed all references to pendo in our app and am getting the same error. I have tried all the above steps

MikePendo commented 1 year ago

I am not sure if u remove all the reference to pendo u still see the same error that it cant resolve pendo?

kristinadarroch commented 1 year ago

i kept it in my node modules and have the pod changes only, i'm not initializing the library or anything and i'm still getting the error

MikePendo commented 1 year ago

if u remove pendo totally will it compile ? Do u run it from terminal or Xcode ? (can u try both ways) When u delete all the cache did u kill the Metro, delete the app reset all the caches? (by killing the terminal) if u create a new project like I did and add pendo will u be able to run it?

MikePendo commented 1 year ago

@kristinadarroch Did u manage to resolve the issue?

MikePendo commented 1 year ago

@kristinadarroch I am closing the issue feel free to open

kristinadarroch commented 1 year ago

Can you try on react native version 0.66.3, sorry was OOO

kristinadarroch commented 1 year ago

@MikePendo I am unable to reopen the issue

MikePendo commented 1 year ago

if u try the following from here with RN 66 will it work for u?

kristinadarroch commented 1 year ago

@MikePendo yes I did follow from here, I think it might be the version of rn 66

MikePendo commented 1 year ago

@kristinadarroch

npx react-native init SampleAppClean --version 0.66.3
yarn add rn-pendo-sdk
cd ios
pod install --repo-update

importing the following import {withPendoRN, PendoSDK, NavigationLibraryType} from "rn-pendo-sdk"; in App.js Running the app in Xcode (14.0.1) simulator , running as expected.

As a last resort I would suggest t share with me some sample project with the issue and I will look into it