question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MISSING index.ts file cannot resolve module

See original GitHub issue

Is 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 amain 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:closed
  • Created 2 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
omar-abdulcommented, Mar 18, 2022

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 have fixed it, can someone confirm it?

— Reply to this email directly, view it on GitHub https://github.com/react-native-elements/react-native-elements/issues/3402#issuecomment-1072388524, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFPAPYZ6UVJ6XZPQBF2YDO3VAR5GJANCNFSM5RAA3GUQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you modified the open/close state.Message ID: <react-native-elements/react-native-elements/issues/3402/1072388524@ github.com>

0reactions
arpitBhallacommented, Mar 18, 2022

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 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typescript error: index.d.ts file is missing · Issue #147 - GitHub
After upgrading the library from 1.2.3 to 1.2.5 I started to see hookrouter/dist/index.d.ts is not a module error. I think it's because *.d.ts...
Read more >
Webpack cant resolve TypeScript modules - Stack Overflow
The issue for me was that I had forgotten to compile the submodule (ie run tsc to generate index.js) before referencing it from...
Read more >
Common TypeScript module problems and how to solve them
Solution 2: Locate the module and resolve imports ; "*" value in the array means the exact name of the module, while the...
Read more >
ts-loader - npm
Start using ts-loader in your project by running `npm i ts-loader`. ... src/index.ts ... Cannot find module 'components/myComponent2'.,file: ...
Read more >
Cannot find module 'fs' Error in TypeScript | bobbyhadz
To solve the "Cannot find module fs or its corresponding type declarations" error, install the types for node by running the command npm...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found