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 issueerror: 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:
- Clear watchman watches: watchman watch-del-all
- Delete node_modules: rm -rf node_modules and run yarn install
- Reset Metro’s cache: yarn start --reset-cache
- 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:
- Created 4 years ago
- Reactions:6
- Comments:21
Top GitHub Comments
Just check if you somewhere accidentally imported something from @babel/core. That helped me.
after that remove import { loadPartialConfig } from ‘@babel/core’; everything go right