lakshan sampath
lakshan sampath

Reputation: 341

Package rn-fetch-blob contains invalid configuration: "dependency.hooks" is not allowed

Package rn-fetch-blob contains invalid configuration: "dependency.hooks" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.

package.json - "react-native": "0.69.2", "rn-fetch-blob": "^0.12.0"

Upvotes: 5

Views: 14831

Answers (4)

AIPitton
AIPitton

Reputation: 51

Fix rn-fetch-blob contains invalid configuration: "dependency.hooks" is not allowed when run npm run android

🟢 npm uninstall rn-fetch-blob

🟢 npm install react-native-blob-util

In my case I've replaced

import RNFetchBlob from 'rn-fetch-blob'

with

import RNFetchBlob from 'react-native-blob-util'

Now when I npm run android displays:

Task :react-native-blob-util:compileDebugJavaWithJavac

This message indicates that Gradle, the build system used by React Native for Android development, is successfully compiling the Java code for the react-native-blob-util library during the Android build process. This is typically a positive sign, as it means that the library is being integrated correctly into the project.

Upvotes: 2

Deepak Kumar
Deepak Kumar

Reputation: 1

you can go to the rn-fetch-blob package folder from node_modules and delete react-native.config.js file.

it worked

Upvotes: -1

Pratik Prakash Bindage
Pratik Prakash Bindage

Reputation: 927

This has been fixed with a PR that has been submitted to NPM and merged in here: https://github.com/joltup/rn-fetch-blob/pull/796#issuecomment-1199721977).

This should be fixed in the upcoming update, but in the meanwhile, you can do the following to solve it:

npm add [email protected]

Upvotes: 3

Rifadh KP
Rifadh KP

Reputation: 149

Just go to the rn-fetch-blob package folder from node_modules and delete react-native.config.js file.

Upvotes: 12

Related Questions