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.

Module `@components/Hello` does not exi st in the Haste module map

See original GitHub issue

my tsconfig.json

...
 "paths": {
      "@components/*":["src/components/*"]
    }, 
...

and my app.tsx

import Hello from '@components/Hello'

and tsc check is no errors but bundling failed

error: bundling failed: Error: Unable to resolve module `@components/Hello` f
rom `F:\RN\TS\UserTrain\src\App.tsx`: Module `@components/Hello` does not exi
st in the Haste module map

why?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

6reactions
stepankocicommented, Nov 9, 2018

Add the package.json file to the components (target) directory with following content:

{
  "name": "@components",
  "private": true
}

(I’m not sure about @ in the package name)

0reactions
fantasy525commented, Nov 14, 2018

@fantasy525 @FabianMeul @tkulpa By follow @stepankoci reply, Issue resolved. nice ,it works for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Module path does not exist in the Haste module map #39
My issue was related to using a transformer in the app.json (typescript). This transformer was altering the source before the plugin had a ......
Read more >
reactjs - Unable to resolve module...does not exist in the haste ...
But since I started the new project, after adding custom modules in the project I have this error message. In this case I...
Read more >
Module doesn't exist in the Haste module map. : r/reactnative
Hi everyone, I'm having some problems with my application (see image below). I've made sure that my package is installed, followed the steps ......
Read more >
react native unable to resolve module - You.com
So the root cause is, the file it lists in the error message is importing the native Node module path , which isn't...
Read more >
Troubleshooting common React Native bugs - LogRocket Blog
The prompt does not identify the component or even the line on which the error ... If you are sure the module exists,...
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