-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Description
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 ()
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 ()
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(R) Core(TM) 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