Add rn-nodeify to your devDependencies in package.json:

"devDependencies": {
"rn-nodeify": "^6.0.1"
}

Add the following to the scripts section of the same file:

"scripts": {

"postinstall": "node_modules/.bin/rn-nodeify --install crypto --hack"
}
npm i --save react-native-crypto
# install peer deps
npm i --save react-native-randombytes
react-native link react-native-randombytes
# install latest rn-nodeify
npm i --save-dev mvayngrib/rn-nodeify
# install node core shims and recursively hack package.json files
# in ./node_modules to add/update the "browser"/"react-native" field with relevant mappings
./node_modules/.bin/rn-nodeify --hack --install

Unable to resolve module crypto的更多相关文章

  1. Unable to resolve module LinkedStateMixin

    由于前面reactive文件夹的删除,导致运行程序的时候出现Unable to resolve module LinkedStateMixin 的错误. 搞了好久都没办法解决,看来不深入其中,无法解决 ...

  2. RN错误随笔 - Unable to resolve module 'AccessibilityInfo'

    错误信息:.React Native 运行报错:Unable to resolve module 'AccessibilityInfo' 可以看到在 异常的返回的JSON 结构中给出了推荐的解决方法 ...

  3. react-native “Unable to resolve module 'AccessibilityInfo'” 的解决方案

    执行 react-native run-android 安装Android APP后却是一屏大红幕报 Unable to resolve module ‘AccessibilityInfo’ 的异常 ...

  4. react native "Unable to resolve module `AccessibilityInfo`

    error: bundling failed: "Unable to resolve module `AccessibilityInfo` from `/Users/apple/Websto ...

  5. [RN] React Native 使用 react-navigation 报错 "Unable to resolve module `react-native-gesture-handler`

    在React Native 使用 react-navigation 过程中,报错 "Unable to resolve module `react-native-gesture-handle ...

  6. 通过创建制定版本react-native项目解决“Unable to resolve module `AccessibilityInfo` ”的问题

    react-native init MyApp --version 0.55.4 注:不能将--version简写成-v

  7. unable to resolve module react-native-gesture-handler from

    在安装了npm install --save react-navigation后跑项目然后就红屏了. 解决方法: 安装触摸方式(需要执行以下方法) npm install --save react-n ...

  8. Unable to resolve module `../res/images/ic_popular.png`

  9. 'yii\base\InvalidRouteException' with message 'Unable to resolve the request "site/error".'

    引用:http://www.linuxidc.com/Linux/2015-02/114116.htm Yii2高级版本复制新项目会遇到下面的报错信息: exception 'yii\base\Inv ...

随机推荐

  1. [Python]基础教程(2)、PyCharm安装及中文编码

    一.PyCharm安装 http://blog.csdn.net/yctjin/article/details/70307933?locationNum=11&fps=1 这篇文章写得及其详细 ...

  2. 【jvisualvm远程监控配置】

    第一步:首先通过hostname -i  和ifconfig命令,查看一下IP地址是否一致 如果不一致,修改hosts的IP地址:vi /etc/hosts    把ip地址和ifconfig的地址修 ...

  3. CSS【05】:CSS三大特性

    继承性 作用:给父元素设置一些属性,子元素也可以使用,这个我们就称之为继承性 示例代码: <style> div { color: red; } </style> <di ...

  4. Java(1)JDK安装

    1.安装JDK开发环境 下载网站:http://www.oracle.com/ 开始安装JDK: 修改安装目录如下: 确定之后,单击"下一步". 注:当提示安装JRE时,可以选择不 ...

  5. CSS中正确理解浮动以及clear:both的关系

    要注意以下几点: 1. 浮动元素会被自动设置成块级元素,相当于给元素设置了display:block(块级元素能设置宽和高,而行内元素则不可以). 2. 浮动元素后边的非浮动元素显示问题. 3. 多个 ...

  6. 版本控制——Version Control

    版本控制是指对软件开发过程中各种程序代码.配置文件及说明文档等文件变更的管理,是软件配置管理的核心思想之一. 版本控制最主要的功能就是追踪文件的变更.它将什么时候.什么人更改了文件的什么内容等信息忠实 ...

  7. 解决同一activity下多个fragment 切换时重复执行onCreateView方法

    Fragment之间切换时每次都会调用onCreateView方法,导致每次Fragment的布局都重绘,无法保持Fragment原有状态. 解决的办法是:在Fragment onCreateView ...

  8. 为iframe添加onclick事件

    如果页面上有iframe时,鼠标点击在iframe内时,包含iframe的document是不响应任何事件的, 例如: $("#iframe1").click(function() ...

  9. Starting MySQL....The server quit without updating PID file[失败]/lib/mysql/ip12189.pid). 错误一例

    [root@ip12189 etc]# service mysqld startStarting MySQL....The server quit without updating PID file[ ...

  10. JAVA 创建文件和文件夹,删除文件和文件夹的实用工具

    package com.file; import java.io.File; import java.io.IOException; //创建新文件和目录 public class CCRDFile ...