为什么" Native模块不能为null"导入世博会时出错?

时间:2017-09-12 22:11:28

标签: ios macos reactjs react-native expo

我正在使用:

    react-native-cli: 2.0.1
    react-native: 0.48.3
    npm: 4.6.1
    expo: 20.1.3

React Native App由命令创建:react-native init

我已经使用了react-native linkreact-native link expo命令

每次我像这样导入expo时都会遇到问题

    import { Permissions } from 'expo';

或者

    const Expo = require('expo');

我收到此错误: enter image description here

顺便说一下,我正在使用mac

1 个答案:

答案 0 :(得分:1)

您是否在问题

中查看此解决方案

https://github.com/zo0r/react-native-push-notification/issues/160

https://github.com/zo0r/react-native-push-notification/issues/279

在某些情况下重新安装node_modules,清除所有缓存可能有帮助