Compile error - promise
See original GitHub issue- What version of RN and react-native-fcm are you running? RN: 0.56.0 / React-Native-FCM: 16.2.1
- What device are you using? (e.g iOS9 emulator, Android 6 device)? Android 8.0 device
- Is your app running in foreground, background or not running? Not compiling
When I create an react native app with react-native init
and add react-native-fcm
with npm, I cannot compile the projet with react-native run-android
Logs:
:react-native-fcm:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/home/arthur/Documents/node/react-native/ReactNotifTest2/node_modules/react-native-fcm/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java:217: error: cannot find symbol
promise.resolve(null);
^
symbol: variable promise
location: class FIRMessagingModule
/home/arthur/Documents/node/react-native/ReactNotifTest2/node_modules/react-native-fcm/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java:220: error: cannot find symbol
promise.reject(null,e.getMessage());
^
symbol: variable promise
location: class FIRMessagingModule
/home/arthur/Documents/node/react-native/ReactNotifTest2/node_modules/react-native-fcm/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java:228: error: cannot find symbol
promise.resolve(null);
^
symbol: variable promise
location: class FIRMessagingModule
/home/arthur/Documents/node/react-native/ReactNotifTest2/node_modules/react-native-fcm/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java:231: error: cannot find symbol
promise.reject(null,e.getMessage());
^
symbol: variable promise
location: class FIRMessagingModule
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
4 errors
:react-native-fcm:compileReleaseJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-fcm:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Step to reproduce:
react-native init {name}
npm i --save react-native-fcm
react-native link
react-native run-android
Ps: I’m a newbie to react native and firecloud
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Compilation error with promise - typescript - Stack Overflow
When I compile this file I get the following error: 44:16 - error TS2693: 'Promise' only refers to a type, but is being...
Read more >Unexpected compile / type error when using Promise.all #35136
Compile error: "Property 'data' does not exist on type 'RandomType'." Seems to still compile the js file even though it shows a compile...
Read more >WebAssembly.compileStreaming() - MDN Web Docs
A Response object or a promise that will fulfill with one, representing the underlying source of a .wasm module you want to stream...
Read more >Best Practices for Node.js Error-handling - Toptal
In this article, Toptal Full-stack Developer Jay Huang will introduce you to error-handling in Node.js and demonstrate how you can build a robust ......
Read more >Using .then(), .catch(), .finally() to Handle Errors in Javascript ...
A Promise executes immediately and either resolves to a single value, or rejects with an error object. If the promise is rejected, the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This change came from version 16.2.1…
You can fix that by changing your dependency in your package.json : “react-native-fcm” : “16.2.0” (important : remove the ^ to force this exact version)
fixed in 16.2.2