I am trying to learn how to write a react-native module, and I am getting stuck with this error:
Here is what my code looks like:
Module.java (../android/src/main/java/com/reactlibrary)
public class RNGifMakerModule extends ReactContextBaseJavaModule {
private final ReactApplicationContext reactContext;
public RNGifMakerModule(ReactApplicationContext reactContext) {
super(reactContext);
this.reactContext = reactContext;
}
@Override
public String getName() {
return "RNGifMaker";
}
@ReactMethod
public void alert(String message) {
Toast.makeText(getReactApplicationContext(), message, Toast.LENGTH_LONG).show();
}
}
index.android.js
import { RNGifMaker } from 'GifMaker';
const onButtonPress = () => {
RNGifMaker.alert('Hello World');
};
package.json
"dependencies": {
"react": "16.0.0-alpha.6",
"react-native": "0.43.3",
"GifMaker":"file:../"
},
index.js (../)
import { NativeModules } from 'react-native';
module.exports = NativeModules.RNGifMaker;
I have run both npm install and react-native link.
I have (for the most part) followed this tutorial.

../index.jsGifMakerwhich I set inpackage.json. Thanks for the help!