react-native-firestack icon indicating copy to clipboard operation
react-native-firestack copied to clipboard

Error SPAWN unknown when linking

Open DavidKuennen opened this issue 8 years ago • 6 comments

Getting the error "It seems something went wrong while linking. Error: spawn UNKNOWN" when I try to link on Windows 7 using the command "react-native link react-native-firestack".

DavidKuennen avatar Jan 24 '17 16:01 DavidKuennen

Also got this error. On Windows 10.

mienaikoe avatar Jan 29 '17 17:01 mienaikoe

Same problem here with windows 10.

remiroyc avatar Feb 15 '17 21:02 remiroyc

As per @mienaikoe the solution is in #270

add

include ':react-native-firestack'
project(':react-native-firestack').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firestack/android')

To settings.gradle

groke avatar Mar 01 '17 16:03 groke

For anyone still running into issues after trying @groke's suggestion

Try removing this from node_modules/react-native-firebase/package.json:

    "commands": {
      "prelink": "node_modules/react-native-firestack/bin/prepare.sh",
      "postlink": "node_modules/react-native-firestack/bin/cocoapods.sh"
    },

as suggested here (different package but perhaps same issue?): https://github.com/auth0/react-native-lock/issues/86#issuecomment-241513859

I guess it works if you just want to get it running, but note that you might need to add it again to make it work in ios as mentioned further down in that issue.

andreasnilssondev avatar Mar 04 '17 00:03 andreasnilssondev

Still getting this problem after adding the lines to my settings.gradle. Has anyone been able to fix this yet? I'm getting a bunch of errors when I try to do it the manual way as well :(

bramvbilsen avatar Mar 14 '17 20:03 bramvbilsen

please go to node_module/the_package_you_are_linking/package.json

and remove these lines . it will work like a cakewalk.

"rnpm": { "commands": { "postlink": "node_modules/react-native-background-fetch/scripts/postlink.js", "postunlink": "node_modules/react-native-background-fetch/scripts/postunlink.js" } },

rahulbhankar786 avatar Sep 19 '18 05:09 rahulbhankar786