1.
error: bundling failed: Error: Unable to resolve module `@babel/runtime/helpers/interopRequireDefault` from `/Users/chrisedgington/Development/ReactNative/SixNationsPredictor/index.js`: Module `@babel/runtime/helpers/interopRequireDefault` 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 (/Users/chrisedgington/Development/ReactNative/MyApp/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:209:1301)
at ResolutionRequest.resolveDependency (/Users/chrisedgington/Development/ReactNative/MyApp/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:83:16)
at DependencyGraph.resolveDependency (/Users/chrisedgington/Development/ReactNative/MyApp/node_modules/metro/src/node-haste/DependencyGraph.js:238:485)
at Object.resolve (/Users/chrisedgington/Development/ReactNative/MyApp/node_modules/metro/src/lib/transformHelpers.js:180:25)
at dependencies.map.result (/Users/chrisedgington/Development/ReactNative/MyApp/node_modules/metro/src/DeltaBundler/traverseDependencies.js:311:29)
at Array.map (<anonymous>)
at resolveDependencies (/Users/chrisedgington/Development/ReactNative/MyApp/node_modules/metro/src/DeltaBundler/traverseDependencies.js:307:16)
at /Users/chrisedgington/Development/ReactNative/MyApp/node_modules/metro/src/DeltaBundler/traverseDependencies.js:164:33
at Generator.next (<anonymous>)
at step (/Users/chrisedgington/Development/ReactNative/MyApp/node_modules/metro/src/DeltaBundler/traverseDependencies.js:266:307)
===================》》》》
Have a go and try:
npm add @babel/runtime
Or upgrade babel runtime:
"@babel/runtime": "7.0.0-beta.55"
2.react native中的CameraRoll使用时,TypeError: Cannot read property 'getPhotos' of undefined错误
==================>>>>>>>>>
在xcode中手动导入RCTCameraRoll.xcodeproj
右键“Library”,选择“Add ....” RCTCameraRoll.xcodeproj的路径为
"/Users/xxxx/demo/node_modules/react-native/Libraries/CameraRoll"
然后,选中项目,不是选中当前库,在Link Binary With Libraries 菜单中加入libRCTVideo.a到工程中,直接拖过去。
继续运行就可以了
3. react-native-fs出现bugCannot read property 'RNFSFileTypeRegular' of undefined
这个有可能是代码没有同步造成的,具体原因不详,但是解决方案已经找到。关掉APP,重新运行一下就OK了。
4.No bundle URL present. Make sure you’re running a packager server or have included a .jsbundle file in your application bundle.
==================>
删除ios/build路径,然后重新react-native run-ios
没有用,接着第二种办法:
删除node_modules,然后重新react-native run-ios
分享到:
相关推荐
react-native-sms, 支持iOS和Android的短信发送方 react-native-sms用户定义的SendSMS使用这个 rn 组件发送带有回调 (completed/cancelled/error). iOS和Android的短信。目前,只支持用户发送短信。 this react-na
yarn add react-native-error-boundary 用法 该组件在其子组件树中的任何位置捕获。 不处理本机错误。 使用这个组件非常简单。 首先,您必须导入ErrorBoundary组件。 然后,您必须将其包裹在任何可能引发错误的组件...
Yet another Github client written in react-native. Includes ? Feed like web github home. Watched repos' notification. Trends. Personal. How to run iOS rm -rf node_modules npm install if error about...
安装你可以通过npm安装这个组件: npm i react-native-error-reporter --savernpm link用法在您的应用程序标头(例如app.js或index.ios.js / index.android.js)中引导它...var ErrorReporter = require ( 'react-...
React本机图像旋转该项目支持本机> = 0.40.0 该模块旨在与react-native的一起使用,以创建功能齐全的裁剪工具安装首先通过npm安装软件包$ npm install react-native-image-rotate 然后使用链接本机库$ react-native ...
React本机相机胶辊适用于React本机的CameraRoll Picker组件 需要react-native >=0.43.0添加到项目通过npm安装组件$ npm install react-native-camera-roll-picker --save从@ react-native-community安装CameraRoll $...
react-native-sqlite 是 React Native 上的一个 sqlite3 绑定,它可以打开数据库并让 SQL 查询运行其中。目前还只是早期版本, API 还有可能会改变。示例代码:var sqlite = require('./react-native-sqlite'); ...
react-native-style-utilities React Native StyleSheet API的全类型钩子和实用程序函数npm i ESLint设置如果您使用的是插件,请将以下内容添加到.eslintrc.js : "react-hooks/exhaustive-deps" : [ "error" , { ...
react-native-share-pdf Android库,用于保存和共享base64编码的PDF。动机在iOS上使用React Native API共享base64 PDF可以使用,但不适用于Android。 ShareFile JAVA模块通过将文档保存在设备的本地存储中并进行共享...
react-native-template 介绍 此库封装了常用 UI 组件和部分项目配置,可用于快速迭代开发基于 RN 的项目。 已完成 Container Error ImageView Loading Navigation Touchable(Button) List Row Toast StorageManager ...
React Native模块,使您可以注册一个全局错误处理程序,该错误处理程序可以捕获致命/非致命未捕获异常。 该模块有助于防止RN Apps突然崩溃,而不会向用户显示优美的消息。 在当前情况下: In DEV mode , you get ...
一个允许React Native应用程序通过SSH运行命令的库。 用法 该库提供了一个方法: SSH.execute 。 给定SSH凭据和命令,将返回Promise。 此承诺解析为字符串数组形式的命令输出。 import SSH from 'react-native-...
React本地玩笑 我在不同项目中使用的React Native的Jest模拟集合。 用法 首先,安装软件包。 yarn add react-native-jest-mocks ...console.error:目前已包括在内,以避免来自React导航的某些警告。
React本色用于React Native开发的工具包安装yarn add react-native-grace 用法记录仪import logger, {setCustomLogger} from 'react-native-grace/logger';// Set custom loggers (optional)setCustomLogger({error:...
React本地玩笑 我在不同项目中使用的React Native的Jest模拟集合。 用法 首先,安装软件包。 yarn add react-native-jest-mocks ...console.error:目前已包括在内,以避免来自React导航的某些警告。
react-native-SVProgressHUD SVProgressHUD对于您的React应用,支持IOS和Android iOS安装 pod 'SVProgressHUD' Android安装 compile 'com.bigkoo:svprogresshud:1.0.0' 用法 SVProgressHUD.dismiss(); ...
yarn add react-native-safe-image import { SafeImage } from 'react-native-safe-image' // ... render ( ) { return ( < SafeImage source = { { uri : 'http://Normal-Image-Maybe-OnError.jpg' } } ...
目前仅在React Native中进行了测试,不过应该可以在React和浏览器中使用。 工作正在进行中 ✕命名空间切换和突出显示 :check_mark: 颜色 :check_mark: 支持浏览器,节点,react,react-native调试控制台,文件的...
弃用通知我们在最新的多合一升级了我们的React Native支持。 所有运行React Native 0.60+的项目都应升级到我们的新React Native通知程序: 。 有关如何升级的详细信息,请参阅。 现在已弃用该软件包,但旧版本的...
安装npm i react-native-upload-image-expo用法参见: < ImageUploadExpo xss=removed xss=removed xss=removed xss=removed xss=removed> console . warn ( error ) } onSuccess = { ( image , rawResponse ) => { ...