---
title: "React Native 0.27.2编译报错this._nativeModule.addListener is not a function"
author: "jsntghf"
date: "2016-06-12T15:21:22Z"
tags: ["iOS"]
categories: ["移动开发"]
slug: "react-native-0-27-2-this-nativemodule-addlistener-is-not-a-function"
draft: false
lastmod: "2016-06-12T15:22:04Z"
id: 2304461
url: "https://eric-gao.iteye.com/blog/2304461"
---

React Native：0.27.2

React：15.1.0

Node：6.1.0

npm：3.8.6

 

编译报错如下：

this.\_nativeModule.addListener is not a function.(In 'this.\_nativeModule.addListener(eventType)','this.\_nativeModule.addListener' is undefined)

 

解决办法：

npm link