brentvatne / stargrave-0

preserving my stars for vanity. former home of react-native-modal
389 stars 65 forks source link

Xcode problems with NPM 3 #33

Closed evansolomon closed 7 years ago

evansolomon commented 9 years ago

When installed as a dependency of another project, dependencies may not be within a node_modules subdirectory. This causes problems for the build phase steps that expect the overlay and blur modules to be in subdirectories.

Sadly I don't know enough about Xcode to figure out how to get it to look in multiple places for those files.

brentvatne commented 9 years ago

That one is tricky, could you paste a tree of your node_modules here? (preferably only a couple of levels deep)

evansolomon commented 9 years ago

Here's an example tree output from the node_modules directory of a fresh project (via react-native init) with this module installed (via npm i --save react-native-modal): https://gist.github.com/evansolomon/7ebcb5e4ae331e1997cd

It's quite long, but the meaningful bit is that there is no react-native-modal/node_modules directory.

shantanuraj commented 9 years ago

I have the same issue, I've been using react-native-overlay module without any problem, the node_modules folder for modal contains the blur and tween packages, but not the overlay package, which if I add manually Xcode complains about duplicate symbols.

Before adding the overlay folder screenshot 2015-07-14 10 23 43

After adding the overlay folder manually screenshot 2015-07-14 10 21 15

brentvatne commented 9 years ago

Thanks folks, I'll try to find some time to solve this if nobody else can, not a lot of time for this during the week though

shantanuraj commented 9 years ago

A temporary work around is to link libRNModal.a and remove the libRNOverlay.a, this worked for me. I am not using the blur library, but I guess the same process would be applicable to it too if one is using it. Have a great week ahead!

LeoFidjeland commented 9 years ago

Having the same issue, @shantanuraj's solution works great for now though. Thanks!

michaelklopf commented 9 years ago

Any progress on this topic? Xcode is still not happy, because it can't find the other modules. As seen in @evansolomon's gist, npm places the modules on the same folder hierarchy as react-native-modal.