react-native: bundling failed: Error: Unable to resolve module `./../react-transform-hmr/lib/index.js
I created the project and run it according to the official tutorial(https://facebook.github.io/react-native/docs/getting-started.html), but the following error occurred:
bundling failed: Error: Unable to resolve module ./../react-transform-hmr/lib/index.js
from /Users/victory/Desktop/React-Native-Learning/AwesomeProject/App.js
: The module ./../react-transform-hmr/lib/index.js
could not be found from /Users/victory/Desktop/React-Native-Learning/AwesomeProject/App.js
. Indeed, none of these files exist:
/Users/victory/Desktop/React-Native-Learning/react-transform-hmr/lib/index.js(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
/Users/victory/Desktop/React-Native-Learning/react-transform-hmr/lib/index.js/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
at ModuleResolver.resolveDependency (/Users/victory/Desktop/React-Native-Learning/AwesomeProject/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:209:697) at ResolutionRequest.resolveDependency (/Users/victory/Desktop/React-Native-Learning/AwesomeProject/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:83:16) at DependencyGraph.resolveDependency (/Users/victory/Desktop/React-Native-Learning/AwesomeProject/node_modules/metro/src/node-haste/DependencyGraph.js:222:485) at Object.resolve (/Users/victory/Desktop/React-Native-Learning/AwesomeProject/node_modules/metro/src/lib/transformHelpers.js:149:25) at dependencies.map.result (/Users/victory/Desktop/React-Native-Learning/AwesomeProject/node_modules/metro/src/DeltaBundler/traverseDependencies.js:316:29) at Array.map (<anonymous>) at resolveDependencies (/Users/victory/Desktop/React-Native-Learning/AwesomeProject/node_modules/metro/src/DeltaBundler/traverseDependencies.js:312:16) at /Users/victory/Desktop/React-Native-Learning/AwesomeProject/node_modules/metro/src/DeltaBundler/traverseDependencies.js:169:33 at Generator.next (<anonymous>) at step (/Users/victory/Desktop/React-Native-Learning/AwesomeProject/node_modules/metro/src/DeltaBundler/traverseDependencies.js:271:307)
==================================================================================================================================================== AwesomeProject react-native info
React Native Environment Info: System: OS: macOS High Sierra 10.13.2 CPU: x64 Intel® Core™ i5-4278U CPU @ 2.60GHz Memory: 365.79 MB / 8.00 GB Shell: 5.3 - /bin/zsh Binaries: Node: 10.11.0 - /usr/local/bin/node Yarn: 1.10.1 - /usr/local/bin/yarn npm: 6.4.1 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 11.2, macOS 10.13, tvOS 11.2, watchOS 4.2 IDEs: Xcode: 9.2/9C40b - /usr/bin/xcodebuild npmPackages: react: 16.5.0 => 16.5.0 react-native: 0.57.2 => 0.57.2 npmGlobalPackages: react-native-cli: 2.0.1
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 28 (5 by maintainers)
Solving the problem for now
react-native start --reset-cache