notifee: Package "@notifee/react-native" does not contain a valid config plugin.
I’ve started getting this error today
Package "@notifee/react-native" does not contain a valid config plugin.
Learn more: https://docs.expo.dev/guides/config-plugins/#creating-a-plugin
Cannot use import statement outside a module
Error: build command failed.
when running expo start -c
or eas build
. AFAIK, I haven’t made any changes that could have led to this error
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 24
- Comments: 25 (7 by maintainers)
@leggomuhgreggo I think you’re right. I removed the notifee config plugin from my app.config.js and everything is working fine so far. Tried it with a development build and a production build
I started a new project using expo v
~48.0.18
and notifee^7.8.0
yesterday;After adding notifee I started getting an error,
Notifee native module not found
.Is it expected that after adding notifee / any prebuilt code, Expo Go is no longer a valid route for testing?
EDIT: Figured it out;
In case anyone else stumbles across this w/ the same issue, you have to run
npx expo run:ios
/npx expo run:android
ornpx expo run:ios -d
after adding native code.Sorry but in official documentation I still see:
is plugin needed for expo or not?
In latest version there is no more Expo plugin.
If you want to use this library in your app you need to add native code manually to your app. You need to create development build, because Expo Go doesn’t support native modules.
Yep! @pencilcheck apologies that the published docs are currently not in sync with the committed docs. This is a bug and it is obviously not a great developer experience.
If you click in to here you will see current docs: https://github.com/invertase/notifee/blob/main/docs-react-native/react-native/docs/overview.md
Hi there @ryonwhyte 👋 - Expo support here specifically is community supported vs react-native CLI, and in general in an open source repository any statement that starts with “I think … still need to be…” should be mentally read as “I’ll propose a PR to…” - it’s how the open source world moves forward…
For anyone else following along I recognize there are a few PRs here that have gotten stale and not been merged over the last few months but I will go back and harvest everything I can, we will merge any + all reasonable PRs 🙏
I think the docs still need to be updated. Expo now uses JDK 11 by default and the instruction to add the config plugin still exist here https://notifee.app/react-native/docs/installation#expo-support
If you are building on your own machine, just add in your
build.gradle
file inandroid
folder the following line:Looks like the plugin directory has been deleted in version 7.8.0
Actually – now that I look at the actual config plugin code that was removed – I’m wondering if the idea is tha the config plugin isn’t really needed anymore?
I don’t see anything called out in the changelog
Might even suggest keeping a shim file, that prints a deprecation warning – just to avoid the abruptness. Also these docs may need to be update