question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[iOS] RNPM/ react-native unlink : Cannot read property 'find' of undefined

See original GitHub issue

Hello,

I created an issue just before RNPM was merged in react native, there is a library I can’t unlink, and it prevents me from using it, since it was updated in the meanwhile. The library is https://github.com/BranchMetrics/react-native-branch-deep-linking

Other libraries I’m able to remove them.

Are there ways to manually unlink a library? What files should I modify ?

Here is the full stack trace I see using rnpm unlink (react-native unlink is less verbose) :

`/usr/local/lib/node_modules/rnpm/node_modules/rnpm-plugin-link/src/ios/removeFromProjectReferences.js:14
  const projectRef = firstProject.projectReferences.find(item => item.ProjectRef === file.uuid);
                                                   ^

TypeError: Cannot read property 'find' of undefined
    at removeFromProjectReferences (/usr/local/lib/node_modules/rnpm/node_modules/rnpm-plugin-link/src/ios/removeFromProjectReferences.js:14:52)
    at removeProjectFromProject (/usr/local/lib/node_modules/rnpm/node_modules/rnpm-plugin-link/src/ios/removeProjectFromProject.js:17:22)
    at unregisterNativeModule (/usr/local/lib/node_modules/rnpm/node_modules/rnpm-plugin-link/src/ios/unregisterNativeModule.js:28:16)
    at unlinkDependencyIOS (/usr/local/lib/node_modules/rnpm/node_modules/rnpm-plugin-link/src/unlink.js:52:3)
    at Object.unlink [as func] (/usr/local/lib/node_modules/rnpm/node_modules/rnpm-plugin-link/src/unlink.js:94:3)
    at Command.runAction (/usr/local/lib/node_modules/rnpm/bin/cli:23:15)
    at Command.listener (/usr/local/lib/node_modules/rnpm/node_modules/commander/index.js:301:8)
    at emitTwo (events.js:106:13)
    at Command.emit (events.js:191:7)
    at Command.parseArgs (/usr/local/lib/node_modules/rnpm/node_modules/commander/index.js:615:12)
`

cc @Kureev @grabbou

Thanks 👍

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

18reactions
haikyuucommented, Oct 29, 2016

react-native unlink module works just fine 👍

2reactions
grabboucommented, Aug 22, 2016

You can follow react-native guide on unlinking, also if you could FWD me your pbxproj (inside xcodeproj) that’d be great. You can find my email listed on my profile. Looks like your project has a slightly different structure that we have never considered before.

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-native unlink library error. 'Cannot read property 'find' of ...
... ios dependency rnpm-install ERR! It seems something went wrong while unlinking. Error: Cannot read property 'find' of undefined Cannot ...
Read more >
Troubleshooting | React Navigation
If the module points to an npm package (i.e. the name of the module doesn't with ./ ), then it's probably due to...
Read more >
react-native-blob-util - npm
A module provides upload, download, and files access API. Supports file stream read/write for process large files.. Latest version: 0.17.0, ...
Read more >
Npm ERR! Cannot read property 'find' of undefined (React ...
I'm trying to migrate from BuddyBuild to BitRise for a React Native application that is live (both iOS and Android) and when I...
Read more >
error cannot read property 'configurations' of undefined. react ...
I think the important part that I was missing even previously is to run pod install for iOS. For Android, the reason it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found