odemolliens / react-native-sim-cards-manager

React Native plugin to manage Sim card(s) & eSim
MIT License
67 stars 29 forks source link

index file is missing - V1.0.11 #52

Closed SamiYousef closed 1 year ago

SamiYousef commented 1 year ago

import SimCardsManagerModule from 'react-native-sim-cards-manager';

Unable to resolve path to module 'react-native-sim-cards-manager'

MatteoBuffo commented 1 year ago

Same here. @SamiYousef did you solve it? If you didn't and you don't mind missing those features from the latest release, you could install the previous version of this library while this gets fixed.

odemolliens commented 1 year ago

https://github.com/odemolliens/react-native-sim-cards-manager/releases/tag/1.0.16

Can you retest with that version, please?

MatteoBuffo commented 1 year ago

@odemolliens now I get this error:

Error: While trying to resolve module `react-native-sim-cards-manager` from file `[file with include SimCardsManagerModule]`, the package `[Myapp]\node_modules\react-native-sim-cards-manager\package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`[Myapp]\node_modules\react-native-sim-cards-manager\index.ts`. Indeed, none of these files exist:

  * [Myapp]\node_modules\react-native-sim-cards-manager\index.ts(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.
jsx|.native.jsx|.jsx|.android.json|.native.json|.json)
  * [Myapp]\node_modules\react-native-sim-cards-manager\index.ts\index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.an
droid.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)

After manually changing index.js to index.ts it worked, so I guess you should do another release that fixes this.

odemolliens commented 1 year ago

😅 https://github.com/odemolliens/react-native-sim-cards-manager/releases/tag/1.0.17