react-native 爬坑错误集合

错误:TransformError
解决:
yarn remove babel-preset-react-native
yarn add babel-preset-react-native@2.1.0

错误:Navigator is deprecated and has been removed from this package
解决:npm install react-native-deprecated-custom-components --save

错误:Navigator is deprecated and has been removed from this package
解决:
npm install react-native-deprecated-custom-components --save
页面引用:import {Navigator} from 'react-native-deprecated-custom-components'

错误:Duplicate declaration "Navitogar"
解决:重复引用 "Navitogar",删除一个

错误:NSInternalInconsistencyException: bundleURL must be non-nil when not implementing loadSourceForBridge
解决:因为系统开了ss代理工具,关闭即可

错误:Cannot find entry file index.ios.js in any of the roots…
解决:rm -rf node_modules  (删掉原来的重新来一遍即可)

错误:Could not connect to development server.  (ERROR Error watching file for changes: EMFILE)
解决:安装 brew install watchman

错误:antd-mobile does not exist in the module map (react-native)
解决:[“import”, { “libraryName”: “antd-mobile”, “style”: “css” }]改成:[“import”, { “libraryName”: “antd-mobile”}]

错误:CFBundleIdentifier”, Does Not Exist
解决:react-native upgrade

错误:no bundle url present
解决:(由于开了代理服务器SS),关闭SS
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容