我在基于iOS或Android应用启动的本机上遇到问题
error:(Unable to resolve module `color` from `#appRoot/native-base-theme/variables/platform.js`: Module `color` does not exist in the Haste module map
我已经尝试了什么
watchman watch-del-all
。node_modules
文件夹:rm -rf node_modules && npm install
。rm -rf /tmp/metro-bundler-cache-*
或npm start -- --reset-cache
。rm -rf /tmp/haste-map-react-native-packager-*
。 (空))版本
native-base: "2.13.5"
react": "16.8.3"
react-moment": "0.9.2"
更新
此错误仅在调试模式下发生
已解决!我所做的是:-删除package-lock.json-npm start---reset-cache
如果我只执行npm start---reset-cache,它将无法正常工作。。。很奇怪。