Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to resolve module ../Components/AccessibilityInfo/AccessibilityInfo #26568

Closed
StasD opened this issue Sep 25, 2019 · 13 comments
Closed

Unable to resolve module ../Components/AccessibilityInfo/AccessibilityInfo #26568

StasD opened this issue Sep 25, 2019 · 13 comments
Labels
API: AccessibilityInfo Bug Resolution: Locked This issue was locked by the bot. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used.

Comments

@StasD
Copy link

StasD commented Sep 25, 2019

React Native version:
System:
OS: macOS Mojave 10.14.6
CPU: (8) x64 Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
Memory: 2.39 GB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.3 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.11.3 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 13.0, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
Android SDK:
API Levels: 27, 28, 29
Build Tools: 27.0.3, 28.0.3, 29.0.2
System Images: android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
Android NDK: 20.0.5594570
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5791312
Xcode: 11.0/11A420a - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.1 => 0.61.1

Steps To Reproduce

  1. With RN 0.61.1, I started getting messages like these in "Output" window in VS Code when I run "Debug iOS":
error: bundling failed: Error: Unable to resolve module `../Components/AccessibilityInfo/AccessibilityInfo` from `node_modules/react-native/Libraries/react-native/react-native-implementation.js`: 

None of these files exist:
  * node_modules/react-native/Libraries/Components/AccessibilityInfo/AccessibilityInfo(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)
  * node_modules/react-native/Libraries/Components/AccessibilityInfo/AccessibilityInfo/index(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)
    at ModuleResolver.resolveDependency (/<my project path>/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:163:15)
    at ResolutionRequest.resolveDependency (/<my project path>/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:52:18)
    at DependencyGraph.resolveDependency (/<my project path>/node_modules/metro/src/node-haste/DependencyGraph.js:282:16)
    at Object.resolve (/<my project path>/node_modules/metro/src/lib/transformHelpers.js:267:42)
    at dependencies.map.result (/<my project path>/node_modules/metro/src/DeltaBundler/traverseDependencies.js:426:31)
    at Array.map (<anonymous>)
    at resolveDependencies (/<my project path>/node_modules/metro/src/DeltaBundler/traverseDependencies.js:423:18)
    at /<my project path>/node_modules/metro/src/DeltaBundler/traverseDependencies.js:275:33
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/<my project path>/node_modules/metro/src/DeltaBundler/traverseDependencies.js:87:24)
 MAP  [dev] ./index.js ░░░░░░░░░░░░░░░░ 0.1% (3/90), failed.

::ffff:127.0.0.1 - - [25/Sep/2019:13:27:26 +0000] "GET /index.map HTTP/1.1" 500 - "-" "-"
error: bundling failed: Error: Unable to resolve module `../Components/AccessibilityInfo/AccessibilityInfo` from `node_modules/react-native/Libraries/react-native/react-native-implementation.js`: 

The project runs fine though.

Describe what you expected to happen:

No such messages

@StasD StasD added the Bug label Sep 25, 2019
@react-native-bot react-native-bot added API: AccessibilityInfo Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used. labels Sep 25, 2019
@elicwhite
Copy link
Member

Does this repro for you on a new project when running react-native init?

The AccessibilityInfo files are .ios.js and .android.js. I'm curious if something in your metro config isn't searching those file extensions since the error message seems to only be checking AccessibilityInfo(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx).

I'm curious if this is a problem in react-native that would be demonstrated in a new project or something that is specific to your project config

@StasD
Copy link
Author

StasD commented Sep 25, 2019

Yes, happens for a brand new project (e.g. react-native init MyCoolApp) too.

@rvgroup
Copy link

rvgroup commented Sep 26, 2019

I have the same error and debug mode (in VS Code - Windows) does not work (after upgrade to RN 0.61.1)

@lucianomlima
Copy link
Contributor

Happens with me too with a working 0.59.9 RN app.

@grean
Copy link

grean commented Sep 29, 2019

The Map file failed to load when a try to connect a chrome debugger inside VScode when i launch 'attach to packager' command.

bundling failed: Error: Unable to resolve module ../Components/AccessibilityInfo/AccessibilityInfo from node_modules\react-native\Libraries\react-native\react-native-implementation.js:

None of these files exist:

  • node_modules\react-native\Libraries\Components\AccessibilityInfo\AccessibilityInfo(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)
  • node_modules\react-native\Libraries\Components\AccessibilityInfo\AccessibilityInfo\index(.native|.native.js|.js|.native.json|.json|.native.ts|.ts|.native.tsx|.tsx)
    at ModuleResolver.resolveDependency (C:\TFS\rean\dietethic\main-v8\UI\mobile\UI\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:163:15)
    at ResolutionRequest.resolveDependency (C:\TFS\rean\dietethic\main-v8\UI\mobile\UI\node_modules\metro\src\node-haste\DependencyGraph\ResolutionRequest.js:52:18)
    at DependencyGraph.resolveDependency (C:\TFS\rean\dietethic\main-v8\UI\mobile\UI\node_modules\metro\src\node-haste\DependencyGraph.js:282:16)
    at Object.resolve (C:\TFS\rean\dietethic\main-v8\UI\mobile\UI\node_modules\metro\src\lib\transformHelpers.js:267:42) at dependencies.map.result (C:\TFS\rean\dietethic\main-v8\UI\mobile\UI\node_modules\metro\src\DeltaBundler\traverseDependencies.js:426:31)
    at Array.map ()
    at resolveDependencies (C:\TFS\rean\dietethic\main-v8\UI\mobile\UI\node_modules\metro\src\DeltaBundler\traverseDependencies.js:423:18)
    at C:\TFS\rean\dietethic\main-v8\UI\mobile\UI\node_modules\metro\src\DeltaBundler\traverseDependencies.js:275:33
    at Generator.next ()
    at asyncGeneratorStep (C:\TFS\rean\dietethic\main-v8\UI\mobile\UI\node_modules\metro\src\DeltaBundler\traverseDependencies.js:87:24)
    MAP [dev] ./index.js ░░░░░░░░░░░░░░░░ 0.1% (7/318), failed.

If i try with debugger inside the Chrome navigator, i can debug without any problems.
It worked fine before i migrate from RN 0.60.4

Here is my react-native info :
System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Memory: 3.22 GB / 15.86 GB
Binaries:
Node: 10.16.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.17.3 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.2.0 - C:\Program Files\nodejs\npm.CMD
SDKs:
Android SDK:
API Levels: 18, 19, 20, 22, 23, 24, 26, 27, 28
Build Tools: 19.1.0, 20.0.0, 21.1.2, 22.0.1, 23.0.1, 24.0.1, 26.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.2, 28.0.3, 29.0.0, 29.0.2
System Images: android-18 | Intel x86 Atom, android-18 | Google APIs Intel x86 Atom, android-19 | Intel x86 Atom, android-19 | Google APIs Intel x86 Atom, android-22 | Intel x86 Atom_64, android-22 | Google APIs Intel x86 Atom_64, android-23 | Intel x86 Atom_64, android-23 | Google APIs Intel
x86 Atom_64, android-24 | Intel x86 Atom_64, android-24 | Google APIs Intel x86 Atom_64, android-25 | Google Play Intel x86 Atom, android-26 | Google
APIs Intel x86 Atom_64, android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom
IDEs:
Android Studio: Version 3.5.0.0 AI-191.8026.42.35.5791312
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.1 => 0.61.1

@wifirevaithi
Copy link

Me also having same issue if anyone having solutions..?

@Wilson-Lim
Copy link

I Am having the same problem, now i cant debug on visual studio Code

@StasD
Copy link
Author

StasD commented Oct 9, 2019

Guys at https://github.com/microsoft/vscode-react-native fixed this. Closing this issue.

@StasD StasD closed this as completed Oct 9, 2019
@elicwhite
Copy link
Member

Cool! Can you link to where they discuss and have the fix?

@grean
Copy link

grean commented Oct 9, 2019

You have to install the last version of vscode-react-native extension and restart vscode. The last version is 0.12.1 actually.

@StasD
Copy link
Author

StasD commented Oct 9, 2019

@TheSavior here. But you don't really need to read it. Just install the updated version of the extension! :)

@nimabk82
Copy link

i have same error with Webstorm, RN 61.4

@mrKorg
Copy link

mrKorg commented Oct 8, 2020

The same problem with WebStorm and RN 0.63.2

@facebook facebook locked as resolved and limited conversation to collaborators Oct 3, 2021
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API: AccessibilityInfo Bug Resolution: Locked This issue was locked by the bot. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used.
Projects
None yet
Development

No branches or pull requests

10 participants