react-native-background-fetch: react-native link fails in Xcode 9
I was having an issue with linking this framework as a part of a project using react-native-background-geolocation @2.9.2 so I was attempting to directly install this dependency (https://github.com/transistorsoft/react-native-background-geolocation/issues/310 lead me to believe that there may have been some dependency issues, but in my case I’m doing a fresh install of the library so there shouldn’t be any lingering old dependencies in node_modules, either way, I’ve deleting node_modules and re-installed a couple of times now 😃
I’m having the following issue trying to install the library
$ npm i react-native-background-fetch --save
$ react-native link react-native-background-fetch
Scanning 847 folders for symlinks in /Users/adamhaney/Repos/new-spoon/node_modules (6ms)
rnpm-install info Linking react-native-background-fetch ios dependency
rnpm-install info iOS module react-native-background-fetch has been successfully linked
/Users/adamhaney/Repos/new-spoon/node_modules/xcode/lib/pbxProject.js:1586
if (project.pbxGroupByName(group).path)
^
TypeError: Cannot read property 'path' of null
at correctForPath (/Users/adamhaney/Repos/new-spoon/node_modules/xcode/lib/pbxProject.js:1586:38)
at correctForPluginsPath (/Users/adamhaney/Repos/new-spoon/node_modules/xcode/lib/pbxProject.js:1572:12)
at pbxProject.addPluginFile (/Users/adamhaney/Repos/new-spoon/node_modules/xcode/lib/pbxProject.js:89:5)
at pbxProject.addSourceFile (/Users/adamhaney/Repos/new-spoon/node_modules/xcode/lib/pbxProject.js:149:21)
at Object.<anonymous> (/Users/adamhaney/Repos/new-spoon/node_modules/react-native-background-fetch/scripts/postlink.js:95:9)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
/Users/adamhaney/Repos/new-spoon/node_modules/react-native/local-cli/core/makeCommand.js:29
throw new Error(`Error occured during executing "${command}" command`);
^
Error: Error occured during executing "node_modules/react-native-background-fetch/scripts/postlink.js" command
at ChildProcess.prelink (/Users/adamhaney/Repos/new-spoon/node_modules/react-native/local-cli/core/makeCommand.js:29:15)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:921:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 8
- Comments: 21 (8 by maintainers)
Had the same issue and found the solution here - https://github.com/alunny/node-xcode/issues/31 You have to add a
Plugins
group to your project. (in Xcode, right click on your project, click “New Group”, and call it “Plugins”)Who’s using windows: put up their hand.