问题
I'm using:
react-native-cli: 2.0.1
react-native: 0.48.3
npm: 4.6.1
expo: 20.1.3
React Native App is created by command: react-native init
And I have used both react-native link
and react-native link expo
commands
Here comes the problem, every time I import expo like so
import { Permissions } from 'expo';
Or
const Expo = require('expo');
I get this error:
BTW, I'm using mac
回答1:
do you review this solution in the issues
https://github.com/zo0r/react-native-push-notification/issues/160
https://github.com/zo0r/react-native-push-notification/issues/279
in some case reinstall node_modules, clear all caches could help
来源:https://stackoverflow.com/questions/46186049/why-does-native-module-cannot-be-null-error-occur-when-i-import-expo