Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package "@notifee/react-native" does not contain a valid config plugin. #799

Closed
MaxAst opened this issue Jun 20, 2023 · 26 comments
Closed
Labels
docs needs-feedback Waiting on response to questions Type: Stale

Comments

@MaxAst
Copy link

MaxAst commented Jun 20, 2023

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

@leggomuhgreggo
Copy link

leggomuhgreggo commented Jun 21, 2023

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

image

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

@MaxAst
Copy link
Author

MaxAst commented Jun 21, 2023

@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

@MaxAst
Copy link
Author

MaxAst commented Jun 21, 2023

@helenaford is this expected? If so, shall I create a PR to update the docs saying that for expo projects no further action is required after npm/yarn/pnpm installing @notifee/react-native?

@helenaford
Copy link
Member

@MaxAst that's correct. yes please! Although it might be that the docs are updated but the website isn't as we're trying to move over to another hosting platform

@helenaford helenaford added needs-feedback Waiting on response to questions docs labels Jun 21, 2023
@helenaford
Copy link
Member

I've also updated the release-notes to make it clear. thanks again, for flagging this

@github-actions
Copy link

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

@MaxAst
Copy link
Author

MaxAst commented Jul 20, 2023

@helenaford I just cloned the repo to update the docs, but saw that the docs are indeed already updated w.r.t to not needing an expo config plugin. While I was on it, I also updated the docs w.r.t the eas build Android server image - The default Android server image on eas now uses JDK 11 by default: #824.

Shall I leave this issue open until the new docs are deployed?

@kgdiem
Copy link

kgdiem commented Jul 30, 2023

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 or npx expo run:ios -d after adding native code.

@github-actions
Copy link

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

@hqasmei
Copy link

hqasmei commented Sep 5, 2023

Hi, is this been solved?
I am having that same error still.

@Milk-Cool
Copy link

same here :(

@Bialson
Copy link

Bialson commented Sep 19, 2023

If you are building on your own machine, just add in your build.gradle file in android folder the following line:

allprojects {
    repositories {
        maven { url "$rootDir/../node_modules/@notifee/react-native/android/libs" } // <- this line
    }
}

@lasharela
Copy link

Sorry but in official documentation I still see:

{
  "name": "my app",
  "plugins": [
    "@notifee/react-native"
  ]
}

is plugin needed for expo or not?

@Bialson
Copy link

Bialson commented Sep 24, 2023

In latest version there is no more Expo plugin.

image

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.

@github-actions
Copy link

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 6, 2023
@ryonwhyte
Copy link

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

@mikehardy
Copy link
Contributor

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 🙏

@ryonwhyte
Copy link

@mikehardy Agreed! I see these changes have already been proposed. c441b9a

@mikehardy
Copy link
Contributor

Ah then it is likely the problem is just the docs site is not currently being published even after we merge docs.

I had forgotten that was also an issue in this repo 😞 - Tracked down the issue for that one and reopened it #559

@pencilcheck
Copy link

pencilcheck commented Dec 16, 2023

The doc stills said that expo plugin is still supported: https://notifee.app/react-native/docs/installation

Ok, based on the commit linked above, basically just delete the notifee plugin lines in app.config.js then you are all set.

@mikehardy
Copy link
Contributor

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

@brimby
Copy link

brimby commented Dec 24, 2023

The docs still aren't right though because they say you need to use some old ubuntu image, when in reality the current default will suffice.

Please note that Notifee needs Java JDK 11+ to build on Android. If you are building the app with EAS, you need to change the image used for the build. You will have to use image as ubuntu-18.04-jdk-11-ndk-r19c or another image that has jdk 11 as in the following configuration. ([EAS Build Server Configuration](https://docs.expo.dev/build-reference/infrastructure/#image--ubuntu-1804-jdk-8-ndk-r19c--alias--default))

@mikehardy
Copy link
Contributor

Ah, I think I may have just fixed building with JDK11+ ( #933 - such that JDK17 will work and JDK21 won't work yet but will work once google finally releases android gradle plugin 8.2.1 with a bugfix)

If you can find post a PR to whatever docs page is still recommending that it will get done before I get a chance to

@vivere-dally
Copy link

Hi @mikehardy, apologies for tagging you out of the blue. Trying to use this library and I got confused about the docs. I looked into the repo for the commited docs, followed through and still got into an issue such as #350. What docs should be followed in order to give a complete walk-through for a correct setup for the library?

@mikehardy
Copy link
Contributor

Hmm should be the docs in git 🤔

@cleytonchagasbr
Copy link

Hello guys, for ios, where is docs currently?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs needs-feedback Waiting on response to questions Type: Stale
Projects
None yet
Development

No branches or pull requests