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.

Error: Unable to resolve module `path` from `node_modules/@babel/core/lib/config/item.js`: path could not be found within the project.

See original GitHub issue

error: bundling failed: Error: Unable to resolve module path from node_modules/@babel/core/lib/config/item.js: path could not be found within the project.

If you are sure the module exists, try these steps:

  1. Clear watchman watches: watchman watch-del-all
  2. Delete node_modules: rm -rf node_modules and run yarn install
  3. Reset Metro’s cache: yarn start --reset-cache
  4. Remove the cache: rm -rf /tmp/metro-* at ModuleResolver.resolveDependency (/Users/panfeilong/Desktop/react-native/AwesomeProject/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:186:15) at ResolutionRequest.resolveDependency (/Users/panfeilong/Desktop/react-native/AwesomeProject/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:52:18) at DependencyGraph.resolveDependency (/Users/panfeilong/Desktop/react-native/AwesomeProject/node_modules/metro/src/node-haste/DependencyGraph.js:282:16) at Object.resolve (/Users/panfeilong/Desktop/react-native/AwesomeProject/node_modules/metro/src/lib/transformHelpers.js:267:42) at dependencies.map.result (/Users/panfeilong/Desktop/react-native/AwesomeProject/node_modules/metro/src/DeltaBundler/traverseDependencies.js:426:31) at Array.map (<anonymous>) at resolveDependencies (/Users/panfeilong/Desktop/react-native/AwesomeProject/node_modules/metro/src/DeltaBundler/traverseDependencies.js:423:18) at /Users/panfeilong/Desktop/react-native/AwesomeProject/node_modules/metro/src/DeltaBundler/traverseDependencies.js:275:33 at Generator.next (<anonymous>) at asyncGeneratorStep (/Users/panfeilong/Desktop/react-native/AwesomeProject/node_modules/metro/src/DeltaBundler/traverseDependencies.js:87:24) React Native version:0.61.5

System: OS: macOS Mojave 10.14.6 CPU: (4) x64 Intel® Core™ i5-7360U CPU @ 2.30GHz Memory: 1.23 GB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 10.16.0 - /usr/local/bin/node Yarn: 1.16.0 - /usr/local/bin/yarn npm: 6.9.0 - /usr/local/bin/npm SDKs: iOS SDK: Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1 Android SDK: API Levels: 23, 25, 26, 27, 28 Build Tools: 27.0.3, 28.0.2, 28.0.3 System Images: android-26 | Google Play Intel x86 Atom IDEs: Android Studio: 3.5 AI-191.8026.42.35.5900203 Xcode: 11.2.1/11B500 - /usr/bin/xcodebuild npmPackages: react: 16.9.0 => 16.9.0 react-native: ^0.61.5 => 0.61.5 npmGlobalPackages: react-native-cli: 2.0.1

Steps To Reproduce

Describe what you expected to happen: I am writing a code that suddenly reports an error. I did not install any new plugins or versions before or after the error caused me to be overwhelmed. The problem is now. After installing ‘path’, react-native reports an error ‘fs’ not found. I think Anxious for help

Snack, code example, screenshot, or link to a repository:

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:21

github_iconTop GitHub Comments

258reactions
chronikumcommented, Dec 22, 2019

Just check if you somewhere accidentally imported something from @babel/core. That helped me.

20reactions
littleflyercommented, Dec 22, 2019

after that remove import { loadPartialConfig } from ‘@babel/core’; everything go right

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Unable to resolve module path" in React Native
The error message: Unable to resolve module path. Should really be: Unable to resolve module "path". path is the name of the module...
Read more >
Resolve
When enabled, symlinked resources are resolved to their real path, not their symlinked location. Note that this may cause module resolution to fail...
Read more >
Module Resolution | Metro - Meta Open Source
Module resolution is the process of translating module names to module paths at build time. For example, if your project contains the code:...
Read more >
React Native, Typescript and VS Code: Unable to resolve ...
The problem with resolving modules turned out to be related to VS ... In my case, it was complaining about imports from internal...
Read more >
Module not found: Can't resolve 'react/jsx-runtime'
To solve the error Module not found: Error: Can't resolve 'react/jsx-runtime', make sure to update the `react` package by opening your terminal in...
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