Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postinstall script fails when parent folder has a space in it #894

Closed
karanjthakkar opened this issue Aug 21, 2018 · 4 comments
Closed

postinstall script fails when parent folder has a space in it #894

karanjthakkar opened this issue Aug 21, 2018 · 4 comments

Comments

@karanjthakkar
Copy link
Contributor

karanjthakkar commented Aug 21, 2018

Description

Due to the changes made to add windows support in this commit, the postinstall script now throws an error if any of the parent folders in which your project lives has a space in it.

For eg: If my project path is /Users/karanthakkar/Work/skyscanner app/react-native/, then I get this:

> detox@7.4.3 postinstall /Users/karanthakkar/Work/skyscanner app/react-native/node_modules/detox
> node scripts/postinstall.js

/bin/sh: /Users/karanthakkar/Work/skyscanner: No such file or directory
child_process.js:644
    throw err;
    ^

Error: Command failed: /Users/karanthakkar/Work/skyscanner app/react-native/node_modules/detox/scripts/build_framework.ios.sh
    at checkExecSyncError (child_process.js:601:13)
    at Object.execSync (child_process.js:641:13)
    at Object.<anonymous> (/Users/karanthakkar/Work/skyscanner app/react-native/node_modules/detox/scripts/postinstall.js:2:27)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:191:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! detox@7.4.3 postinstall: `node scripts/postinstall.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the detox@7.4.3 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/karanthakkar/.npm/_logs/2018-08-21T11_02_33_907Z-debug.log

Steps to Reproduce

  • Create a folder named hello world and cd into it
  • Run npm install detox. This should throw error

Detox, Node, Device, Xcode and macOS Versions

  • Detox: 7.4.3
  • React Native: N/A
  • Node: 8.11.4
  • Device: N/A
  • Xcode: 9.4.1
  • macOS: macOS High Sierra 10.13.6

Device and verbose Detox logs

N/A


NOTE: While I ran into this error on upgrading from 7.3.4 to 7.4.3. this issue exists in the 8.x branch as well.

POTENTIAL FIX: See this - karanjthakkar@821e7b2 If this feels fine, I'd be happy to create a PR for it. It makes the install work correctly for me. Someone would need to test it on windows though. I'm not sure if this breaks anything there.

@karanjthakkar
Copy link
Contributor Author

UPDATE: Looks like it was solved in 5028915. Sorry I couldn't find any issue regarding it. Is it possible to backport this fix to the 7.x branch as well, @noomorph since we can't upgrade to 8.x branch yet?

@LeoNatan
Copy link
Contributor

Unfortunately, we do not maintain several branches, only latest. Why can you not upgrade?

@karanjthakkar
Copy link
Contributor Author

None related to detox but mostly we don't have the bandwidth to look into the changes we would need to do to make it happen 🙂But thanks for the quick reply!

@LeoNatan
Copy link
Contributor

I will close this issue. There shouldn't be many changes necessary to upgrade Detox. If you find issues related to the upgrade, please open a new issue.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants