james murphy
james murphy

Reputation: 1785

React Native - getting error when running command "react-native unlink"

After upgrading past react-native 0.60.....Im being warned that I should unlink all the 3rd party libraries that were linked manually (as RN now takes care of it via auto-linking).

However when I run react-native unlink <depedency> I get the error Something went wrong while unlinking. Reason Expected [\n\r] but end of input found

Any ideas?

Upvotes: 2

Views: 1195

Answers (3)

Govind Soni
Govind Soni

Reputation: 313

I hope it would help you out:

If you're removing a global package however, any applications referencing it will crash.

Here are different options:

npm uninstall removes the module from node_modules, but not package.json

npm uninstall --save also removes it from dependencies in package.json

npm uninstall --save-dev also removes it from devDependencies in package.json

npm -g uninstall --save also removes it globally

Upvotes: 0

savan patel
savan patel

Reputation: 264

use this command => React-native Unintsall "package-name"

Upvotes: 0

suther
suther

Reputation: 13628

The Reason is, that in one of your files, the blanc-line at the end of the file is missing.

Please check following files for this empty line:

  • ios/[Project].xcodeproj/project.pbxproj
  • android/settings.gradle

You also might unlink your modules manually like this:

Open android/settings.gradle, remove the include & project Lines

After cleanup, the file should look like this:

rootProject.name = 'MyBeautifullApp'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'

Upvotes: 2

Related Questions