Open chensuhuan opened 1 year ago
I also started seeing the same warning this morning after upgrading to React Native 0.71.11
. For context, I'm not using Expo, and I'm using NativeBase 3.4.28
.
I'm also seeing the same error.
"native-base": "^3.4.28", "react": "18.2.0", "react-native": "0.71.8",
same here in ReactNative 0.71.8
and NativeBase3.4.28
After an update, the node module has the Same Warning occurs where I'm using react 18.2.0, ReactNative 0.71.8 , NativeBase 3.4.28, expo ~48.0.18
I have the same issue "native-base": "^3.4.28", "react": "18.2.0", "react-native": "0.71.8",
I have the same issue "native-base": "^3.4.28", "react": "18.2.0", "react-native": "0.71.8",
I just bootstrapped a new project with NativeBase with the same problem: "native-base": "^3.4.28", "react": "18.2.0", "react-native": "0.71.8",
I also faced the same problem
"native-base": "^3.4.28", "react": "18.2.0", "react-native": "0.71.8",
I have the same problem and I'm working without expo.
"native-base": "^3.4.28", "react": "18.2.0", "react-native": "0.71.8",
Same issue here
"native-base": "^3.4.28", "react": "18.2.0" "react-native": "0.71.8",
+1
+1
+1
+1
+1
Idem
+1
+1
+1
+1
I have the same problem, even with brand new app and only native base installed
+1 Incrementing the counter
+1
Please how can one resolve this issue?
NativeBaseProvider is using SSRProvider which is not required anymore. So maintainer will have to remove the SSRProvider in order to fix this issue
NativeBaseProvider is using SSRProvider which is not required anymore. So maintainer will have to remove the SSRProvider in order to fix this issue
@khanakia Can you do this and create a PR for NativeBase to merge?
NativeBaseProvider is using SSRProvider which is not required anymore. So maintainer will have to remove the SSRProvider in order to fix this issue
@khanakia Can you do this and create a PR for NativeBase to merge?
I've created a PR for the issue.
+1
+1
A working around until the oficial fix:
In your App.tsx or index.js
import { LogBox } from "react-native"
LogBox.ignoreLogs([
'In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app.',
])
A working around until the oficial fix:
In your App.tsx or index.js
import { LogBox } from "react-native"
LogBox.ignoreLogs([
'In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app.',
])
Instead of ignoring the error, you can resolve it by yourself. Here's how:
node_modules/native-base/src/core/NativeBaseProvider.tsx
<SSRProvider></SSRProvider>
that wraps {children}
. Take care not to delete {children}
.SSRProvider
import. That is, delete this line import { SSRProvider } from '@react-native-aria/utils';
npx patch-package native-base
. Select yes in the prompt.When Native Base officially fixes it, you can delete the patch from the patch directory that was created and reinstall native-base
Voila! Problem solved.
@natemartins Does this not interfere with the build app when deploying it to production?
@natemartins could you explain the command please, i have an erro at the last step:
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/path-package - Not found
npm ERR! 404
npm ERR! 404 'path-package@*' is not in this registry.
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
did you know if i made some mistake ?
+1
@natemartins could you explain the command please, i have an erro at the last step:
npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/path-package - Not found npm ERR! 404 npm ERR! 404 'path-package@*' is not in this registry. npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.
did you know if i made some mistake ?
the package name is patch-package not path-package, copy from instructions on https://github.com/GeekyAnts/NativeBase/issues/5758#issuecomment-1624099685
@natemartins Does this not interfere with the build app when deploying it to production?
It does not. I have production apps of which I have performed series of patches to libraries whose maintainers were not approving PRs
@natemartins could you explain the command please, i have an erro at the last step:
npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/path-package - Not found npm ERR! 404 npm ERR! 404 'path-package@*' is not in this registry. npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.
did you know if i made some mistake ?
A little tip: when following instructions that involve entering commands in the terminal, it's best to copy and paste the command
@natemartins Does this not interfere with the build app when deploying it to production?
It does not. I have production apps of which I have performed series of patches to libraries whose maintainers were not approving PRs
Thanks for your reply! But how do you determine if it will not interfere with the build? Because to my knowledge, the libraries in the node_modules are installed again when deploying causing the production version to contain the unedited file with code that causes an error. Is my understanding correct, or is there something i am missing?
@natemartins Does this not interfere with the build app when deploying it to production?
It does not. I have production apps of which I have performed series of patches to libraries whose maintainers were not approving PRs
Thanks for your reply! But how do you determine if it will not interfere with the build? Because to my knowledge, the libraries in the node_modules are installed again when deploying causing the production version to contain the unedited file with code that causes an error. Is my understanding correct, or is there something i am missing?
As long as you have the patch directory and a postinstall script in your package.json, even when the library is redownloaded, the postinstall script patches the library again.
In your package.json
, add "postinstall": "patch-package",
to the scripts.
@natemartins could you explain the command please, i have an erro at the last step:
npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/path-package - Not found npm ERR! 404 npm ERR! 404 'path-package@*' is not in this registry. npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.
did you know if i made some mistake ?
A little tip: when following instructions that involve entering commands in the terminal, it's best to copy and paste the command
thanks a lot, but for me works without the command, i only reload the project and run on Expo. Work very well excluding SSRProvider
+1
But why do we have to go through this patch hacking?
Can't just Nativebase maintainer approve the PR everybody is facing this issue and it is so important to fix it for good.
It's not good to be ignored when you have such an urgent issue to be fixed. I wish I would have never used nativebase but there is no going back.
A request to the maintainers. @surajahmed @rayan1810 @ankit-tailor Will you be able to check this issue please at the earliest?
A request to the maintainers. @surajahmed @rayan1810 @ankit-tailor Will you be able to check this issue please at the earliest?
But why do we have to go through this patch hacking?
Can't just Nativebase maintainer approve the PR everybody is facing this issue and it is so important to fix it for good.
It's not good to be ignored when you have such an urgent issue to be fixed. I wish I would have never used nativebase but there is no going back.
You have to know that they have abandoned NativeBase and opted to build a new library, gluestack, while neglecting pertinent pending issues and PRs on this library.
Even the gluestack is buggy.
Does anyone have a better alternative that offers something close or superior to what NativeBase offered?
A working around until the oficial fix: In your App.tsx or index.js
import { LogBox } from "react-native"
LogBox.ignoreLogs([
'In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app.',
])
Instead of ignoring the error, you can resolve it by yourself. Here's how:
- Navigate to
node_modules/native-base/src/core/NativeBaseProvider.tsx
- Delete
<SSRProvider></SSRProvider>
that wraps{children}
. Take care not to delete{children}
.- Remove
SSRProvider
import. That is, delete this lineimport { SSRProvider } from '@react-native-aria/utils';
- Run
npx patch-package native-base
. Select yes in the prompt.When Native Base officially fixes it, you can delete the patch from the patch directory that was created and reinstall
native-base
Voila! Problem solved.
TK, apaguei o componente e funcionou corretamente.
A working around until the oficial fix: In your App.tsx or index.js
import { LogBox } from "react-native"
LogBox.ignoreLogs([
'In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app.',
])
Instead of ignoring the error, you can resolve it by yourself. Here's how:
- Navigate to
node_modules/native-base/src/core/NativeBaseProvider.tsx
- Delete
<SSRProvider></SSRProvider>
that wraps{children}
. Take care not to delete{children}
.- Remove
SSRProvider
import. That is, delete this lineimport { SSRProvider } from '@react-native-aria/utils';
- Run
npx patch-package native-base
. Select yes in the prompt.When Native Base officially fixes it, you can delete the patch from the patch directory that was created and reinstall
native-base
Voila! Problem solved.TK, apaguei o componente e funcionou corretamente.
@Samuelplim Glad it worked. For future purposes, kindly use the language being used on the thread you want to comment on.
A working around until the oficial fix: In your App.tsx or index.js
import { LogBox } from "react-native"
LogBox.ignoreLogs([
'In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app.',
])
Instead of ignoring the error, you can resolve it by yourself. Here's how:
- Navigate to
node_modules/native-base/src/core/NativeBaseProvider.tsx
- Delete
<SSRProvider></SSRProvider>
that wraps{children}
. Take care not to delete{children}
.- Remove
SSRProvider
import. That is, delete this lineimport { SSRProvider } from '@react-native-aria/utils';
- Run
npx patch-package native-base
. Select yes in the prompt.When Native Base officially fixes it, you can delete the patch from the patch directory that was created and reinstall
native-base
Voila! Problem solved.TK, apaguei o componente e funcionou corretamente.
@Samuelplim Glad it worked. For future purposes, kindly use the language being used on the thread you want to comment on.
Wow this works, no more errors and I learned something new, never knew you could patch packages. Thank you!
In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app. . HELP React native, NativeBase
I'm also with this terrible alert, and even making those steps, after a time, return again the warning.
Navigate to node_modules/native-base/src/core/NativeBaseProvider.tsx
Delete <SSRProvider></SSRProvider> that wraps {children}. Take care not to delete {children}.
Remove SSRProvider import. That is, delete this line import { SSRProvi
der } from '@react-native-aria/utils';`Run npx patch-package native-base. Select yes in the prompt.
Expo sdk 48
I'm also with this terrible alert, and even making those steps, after a time, return again the warning.
Navigate to node_modules/native-base/src/core/NativeBaseProvider.tsx
Delete <SSRProvider></SSRProvider> that wraps {children}. Take care not to delete {children}.
Remove SSRProvider import. That is, delete this line import { SSRProvi
der } from '@react-native-aria/utils';`Run npx patch-package native-base. Select yes in the prompt.
Expo sdk 48
Same here
Description
In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app
CodeSandbox/Snack link
1
Steps to reproduce
WARN In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app. at $29383e587d62412a$export$9f8ac96af4b1b2ae
Expo Version: "expo": "~48.0.18",
NativeBase Version
3.4.28
Platform
Other Platform
No response
Additional Information
WARN In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app. at $29383e587d62412a$export$9f8ac96af4b1b2ae
Expo Version: "expo": "~48.0.18",