Detox: postinstall script fails
Description
Trying to run npm install detox --save-dev
will fail with the following error in the detox_ios.log
CodeSign build/Build/Products/Release-iphonesimulator/Detox.framework
/usr/bin/codesign --force --sign - --timestamp=none /_PROJECT_PATH_/node_modules/detox/ios_src/build/Build/Products/Release-iphonesimulator/Detox.framework
cp: /Users/Dan/Library/Detox/ios/d179a1f7560289c939ae80cc7ba3d338d9fc4b5c/DetoxBuild/Build/Products/Release-iphoneos/Detox.framework: No such file or directory
yarn add detox@8.0.0 finishes the detox install without any issue
Steps to Reproduce
Install in a brand new RN project
Detox, Node, Device, Xcode and macOS Versions
- Detox: latest( 8.1.6)
- React Native: 0.56.0
- Node: 10.4.0
- Device: (didn’t get to start the project)
- Xcode: 9.4.1
- macOS: 10.13.6
Device and verbose Detox logs
Provided in description
Thank you 🤗
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 28 (7 by maintainers)
@rborn , okay, I’ll try to look into it tomorrow.
Did you mean that
8.0.0
has no issue whilst8.1.6
has?I think I found the issue. Inside my Xcode workspace settings, I had my build location set to “Custom”, which was putting the build artifacts inside the project folder’s Build directory. When I changed it back to the default setting,
npm install
ran smoothly again. I’m not sure what change should be made to fix this inside detox, but hopefully this should allow you guys to reproduce this easily.In order to reproduce it, delete your DerivedData folder (
Library/Detox/ios/*
) and change your Xcode workspace settings to the values in the second image.Default setting:
Broken setting:
I was not able to reproduce this, sorry. Maybe I need to install
n
instead ofnvm
… dunno.I upgraded to Xcode 9.4 and uninstalled
node
from brew, leaving my environment only withnvm
node. Of course, I diddetox clean-framework-cache
beforenom install
. No luck 😕