React-Native导航错误:我正在尝试运行react导航示例并遇到此错误

时间:2019-07-03 08:53:34

标签: react-native

Loading dependency graph, done.
error: bundling failed: Error: Unable to resolve module `react-navigation` from `D:\firstpage\App.js`: Module `react-navigation` does not exist in the Haste module map

This might be related to https://github.com/facebook/react-native/issues/4968
To resolve try the following:
  1. Clear watchman watches: `watchman watch-del-all`.
  2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.
  3. Reset Metro Bundler cache: `rm -rf /tmp/metro-bundler-cache-*` or `npm start -- --reset-cache`.
  4. Remove haste cache: `rm -rf /tmp/haste-map-react-native-packager-*`.
    at ModuleResolver.resolveDependency (D:\firstpage\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:183:15)
    at ResolutionRequest.resolveDependency (D:\firstpage\node_modules\metro\src\node-haste\DependencyGraph\ResolutionRequest.js:52:18)
    at DependencyGraph.resolveDependency (D:\firstpage\node_modules\metro\src\node-haste\DependencyGraph.js:283:16)
    at Object.resolve (D:\firstpage\node_modules\metro\src\lib\transformHelpers.js:261:42)
    at dependencies.map.result (D:\firstpage\node_modules\metro\src\DeltaBundler\traverseDependencies.js:399:31)
    at Array.map (<anonymous>)
    at resolveDependencies (D:\firstpage\node_modules\metro\src\DeltaBundler\traverseDependencies.js:396:18)
    at D:\firstpage\node_modules\metro\src\DeltaBundler\traverseDependencies.js:269:33
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (D:\firstpage\node_modules\metro\src\DeltaBundler\traverseDependencies.js:87:24)
 DELTA  [android, dev] ..\..\../index.js ▓▓░░░░░░░░░░░░░░ 14.8% (136/354), failed.

::ffff:127.0.0.1 - - [03/Jul/2019:08:50:34 +0000] "GET /index.delta?platform=android&dev=true&minify=false HTTP/1.1" 500 - "-" "okhttp/3.12.1"

0 个答案:

没有答案