React-Native: Requiring unknown module "react/lib/ReactPropTypesSecret" - react-native

I am trying to compile the master branch of the react-native repo to submit a PR. I am following the docs https://facebook.github.io/react-native/docs/android-building-from-source.html
But doing exactly what do docs says, I get the following error on android:
Requiring unknown module "react/lib/ReactPropTypesSecret
Also running on ios gives similar kind of error:
Unable to resolve module react/lib/ReactPropTypesSecret from /Users/aakash/Projects/TestingPR/node_modules/react-native/Libraries/Utilities/deprecatedPropType.js: Unable to find this module in its module map or any of the node_modules directories under /Users/node_modules/react/lib/ReactPropTypesSecret

This issue occurs when an ReactNative-App based on RN 0.28 or older is upgraded to RN 0.30 or newer without to update also the "react"-package to at least 15.3.0.
Have you tried this?
If this will not solve your issue, you should provide your package.json.

Related

i am trying to create an app that can connect with metamask using walletconnect/react-native-dapp but i get this problem

i am trying to create an app that can connect with metamask using walletconnect/react-native-dapp but i get this problem.
What went wrong:
A problem occurred evaluating project ':app'.
Could not find method compile() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
for anyone encountering this down the road... Here's the solution.
React native dependencies in node_modules sometimes use outdated syntax such as the error above "compile" when it should be "implementation" depending on your RN version. I'd use the npm package patch-package or stack overflow how to properly modify dependencies (node_modules) to persist once you install another package.
I ran into this same issue with the same "walletconnect" amoung other errors but finally got it running - keep debugging! You got this.

React Native problem with finding module blacklist in metro-config

I'm trying to use this library. I cloned the code, ran npm install and then ran react-native run-android. As a result I got an error Cannot find module 'metro-config/src/defaults/blacklist'. I looked it up, and found an answer that suggest
to change the content of the blacklist.js file because of faulty regex.
However, I looked at the path suggested in the answer metro-config/src/defaults/blacklist but it didn't contain any blacklist.js files. I also looked at other paths but still didn't find anything with the name blacklist.js.
How can I fix this issue and get the library working?
Node version: v14.17.0
React native version: 0.64.2
I had the same issue in expo-yarn-workspace with the same react-native version.
I fixed it by find where 'metro-config/src/defaults/blacklist' is call and replace it
by 'metro-config/src/defaults/exclusionList' because it's been renamed.
https://github.com/facebook/metro/blob/a94200229df4e7f3a9549665142d4ad4b8d32de5/packages/metro-config/src/defaults/exclusionList.js
https://github.com/facebook/metro/issues/453
Let me know if it works for you !

Error using mismatched PostCSS dependencies

Anyone know how to get composes working in gatsby css modules.
I've tried using.
.dog {
composes: dog from "styles/common.scss"
}
I get this error.
Your current PostCSS version is 5.2.18, but postcss-nesting uses
6.0.23. Perhaps this is the source of the error below.
I've tried installing postcss-nesting
But that doesn't seem to stop the above error in gatsby
Your current PostCSS version is 5.2.18, but postcss-nesting uses 6.0.23. Perhaps this is the source of the error you're running into.
Try upgrading PostCSS to at least 6.0

Libraries installed but didn't work in react-native environment

Anytime I install Library, whether it is, native base or react-native text-input effects.it gives the same error every time..
I don't know what's causing an issue here.
error: bundling failed: Error: While trying to resolve module
native-base` from file `/home/jas/Hopper/screen/Home.js`, the package `
/home/jas/Hopper /node_modules/native-base/package.json` was successfully
found. However, this package itself specifies a `main` module field that
could not be resolved (`/home/jas/Hopper/node_modules/native-base/dist
/src/index.js`. Indeed, none of these files exist:
Delete the build folder in /node_modules/native-base/android/app

Angular flex-layout in Ionic3... rxjs/operator not found?

Trying to use #angular/flex-layout in an existing npm-enabled Ionic 3 project.
Adding "FlexLayoutModule" to my main module's imports won't allow the app to start, saying that: cannot find module "rxjs/operators" is the cause.
Already cleared node_module, npm install, reinstalled Ionic CLI. Nothing helps. Could it be a version conflict? Moreover, I'm already using Observables in this project. I don't get it. And the import of "FlexLayoutModule" is in cause of this issue (disabling the import removes the issue).
Anyone could be successful at using flex-layout with ionic? I've seen this plunk, but it uses system.js, so not 100% reproducing my goal.
http://plnkr.co/edit/y8R0MF?p=info
Edit: a more verbose issue:
Uncaught (in promise): Error: Cannot find module "rxjs/operators"
Error: Cannot find module "rxjs/operators" at Object.580
(http://localhost:8100/build/22.main.js:319:7) at webpack_require
(http://localhost:8100/build/main.js:48:30) at Object.1021
(http://localhost:8100/build/22.main.js:11:79) at webpack_require
(http://localhost:8100/build/main.js:48:30) at
http://localhost:8100/build/main.js:122015:10 at t.invoke
(http://localhost:8100/build/polyfills.js:3:9283) at Object.onInvoke
(http://localhost:8100/build/main.js:4650:37) at t.invoke
(http://localhost:8100/build/polyfills.js:3:9223) at r.run
(http://localhost:8100/build/polyfills.js:3:4452) at
http://localhost:8100/build/polyfills.js:3:14076
I'm getting a similar error with Angular CLI. Everything is OK until I include FlexLayoutModule in the app's NgModule imports. Then I get the error:
Module not found: Error: Can't resolve 'rxjs/operators' in 'D:\dev\Vms.Signup.Client\node_modules\#angular\flex-layout\esm5'
I updated to the latest rxjs and that seems to have fixed it.