小编Vik*_*wal的帖子

使用 react-native 安装本地包作为依赖

我想从一个相对路径的使用包和我已经做npm install ../../ExamplePackagereact-native install ../../ExamplePackage。这些包在多个层次上是相对的,而不仅仅是一个层次。

我收到以下错误

error: bundling failed: Error: Unable to resolve module `ExamplePackage` from `/Users/vikasagr/workspace/test/ReactNative/MyPackage/src/index.js`: Module `ExamplePackage` 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 …
Run Code Online (Sandbox Code Playgroud)

reactjs react-native react-native-web

7
推荐指数
1
解决办法
7880
查看次数

标签 统计

react-native ×1

react-native-web ×1

reactjs ×1