MISSING index.ts file cannot resolve module
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
Explain what you did
After following the guide for installation in their official page, using github packages, treid to run react-native start and it kept crashing with this log
the package
/mnt/Stuff/Sarifle App/Sarifle2/node_modules/@react-native-elements/themed/package.jsonwas successfully found. However, this package itself specifies a
main module field that could not be resolved (
/mnt/Stuff/Sarifle App/Sarifle2/node_modules/@react-native-elements/themed/src/index.ts`
Expected behavior
Running metro.js and reloading app
Describe the bug
Thr problem seemed to be package that i downloaded from the github packages( following the insatllation guide) the package.json read
{ "name": "@react-native-elements/themed", "version": "4.0.0-rc.0", "description": "React Native Elements & UI Toolkit", "main": "dist/index.js", "types": "dist/index.d.ts", "react-native": "src/index.js", "source": "src/index.js", "prepublish": "tsc --composite false", "files": [...
but the structure of the folder was dist>index.js
so i fixed it by renaming the folder to src (which took a whole while trying to configure imports) and then corrected package.json
Incase anyone has the same hassle, i suffered two sleepless nights
Steps To Reproduce
install react-native-elements/themed or /base from github packages
Screenshots
No response
Your Environment
react-native 0.67
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (5 by maintainers)
Top GitHub Comments
Yess yess its working i just tried it, it seems you removed the react-nativr property which was what was causing it to go crazy, thanks
On Fri, Mar 18, 2022, 16:02 Arpit Bhalla @.***> wrote:
I added it because we have example app within the repo, and I need src/** files as source rather than building then using
dist
.Hope it’d work for all. Thanks for your feedback 😃