@13691505478_p大佬,rn项目跑不起来,可以请教一下怎么跑起来吗
- 项目npm run dev:rn
2.将编译好的rn_temp,拖到taro-native-shell根目录,再执行npm install
3.react-native run-android
The development server returned response error code: 500
URL: http://10.0.2.2:8081/rn_temp/index.delta?platform=android&dev=true&minify=false
Body:
{"originModulePath":"E:\taro-native-shell-master\rn_temp\app.js","targetModuleName":"@tarojs/components-rn","message":"Unable to resolve module @tarojs/components-rn
from E:\\taro-native-shell-master\\rn_temp\\app.js
: Module @tarojs/components-rn
does not exist in the Haste module map\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n 1. Clear watchman watches: watchman watch-del-all
.\n 2. Delete the node_modules
folder: rm -rf node_modules && npm install
.\n 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-*
.","errors":[{"description":"Unable to resolve module @tarojs/components-rn
from E:\\taro-native-shell-master\\rn_temp\\app.js
: Module @tarojs/components-rn
does not exist in the Haste module map\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n 1. Clear watchman watches: watchman watch-del-all
.\n 2. Delete the node_modules
folder: rm -rf node_modules && npm install
.\n 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-*
."}],"name":"Error","stack":"Error: Unable to resolve module @tarojs/components-rn
from E:\\taro-native-shell-master\\rn_temp\\app.js
: Module @tarojs/components-rn
does not exist in the Haste module map\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n 1. Clear watchman watches: watchman watch-del-all
.\n 2. Delete the node_modules
folder: rm -rf node_modules && npm install
.\n 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-*
.\n at ModuleResolver.resolveDependency (E:\taro-native-shell-master\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:161:1460)\n at ResolutionRequest.resolveDependency (E:\taro-native-shell-master\node_modules\metro\src\node-haste\DependencyGraph\ResolutionRequest.js:91:16)\n at DependencyGraph.resolveDependency (E:\taro-native-shell-master\node_modules\metro\src\node-haste\DependencyGraph.js:272:4579)\n at dependencies.map.relativePath (E:\taro-native-shell-master\node_modules\metro\src\DeltaBundler\traverseDependencies.js:376:19)\n at Array.map (<anonymous>)\n at resolveDependencies (E:\taro-native-shell-master\node_modules\metro\src\DeltaBundler\traverseDependencies.js:374:16)\n at E:\taro-native-shell-master\node_modules\metro\src\DeltaBundler\traverseDependencies.js:212:33\n at Generator.next (<anonymous>)\n at step (E:\taro-native-shell-master\node_modules\metro\src\DeltaBundler\traverseDependencies.js:297:313)\n at E:\taro-native-shell-master\node_modules\metro\src\DeltaBundler\traverseDependencies.js:297:473"}
processBundleResult
BundleDownloader.java:266
access$200
BundleDownloader.java:35
onResponse
BundleDownloader.java:153
execute
RealCall.java:153
run
NamedRunnable.java:32
runWorker
ThreadPoolExecutor.java:1167
run
ThreadPoolExecutor.java:641
run
Thread.java:919