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

Expo EAS build fails - lefthook #142

Closed
zdnk opened this issue Jun 4, 2023 · 7 comments
Closed

Expo EAS build fails - lefthook #142

zdnk opened this issue Jun 4, 2023 · 7 comments

Comments

@zdnk
Copy link

zdnk commented Jun 4, 2023

SDK version: 2.4.0

Environment: both

Are logs available?

[stderr]
npm ERR! code 1
[stderr]
npm ERR! path /Users/expo/workingdir/build/node_modules/customerio-reactnative
[stderr]
npm ERR! command failed
[stderr]
npm ERR! command sh -c -- node src/postInstall.js && npx lefthook install
[stderr]
npm ERR! Error: exit status 128
[stderr]
npm ERR! npm WARN exec The following package was not found and will be installed: lefthook@1.4.1

Describe the bug
This package is not possible to use with the latest version as the post install script is using a package which is not install (lefthook). When installing locally it creates some file in the project root.

@claudesortwell
Copy link

This is related to this PR #73 @levibostian. I believe it was maybe a mistake to keep lefthook in the post install command. Since for people who use yarn workspaces/eas, it will throw an error on trying to install.

Example im using yarn workspaces and i get this error on install:

TypeError: workspaces config expects an Array

Since npm workspaces work different to yarn.

Here is a patch package file for a temp fix (will open a pr also):

diff --git a/node_modules/customerio-reactnative/package.json b/node_modules/customerio-reactnative/package.json
index d22953d..d77a5d1 100644
--- a/node_modules/customerio-reactnative/package.json
+++ b/node_modules/customerio-reactnative/package.json
@@ -31,7 +31,7 @@
     "example": "yarn --cwd example",
     "pods": "cd example && pod-install --quiet",
     "bootstrap": "yarn example && yarn && yarn pods",
-    "postinstall": "node src/postInstall.js && npx lefthook install",
+    "postinstall": "node src/postInstall.js",
     "format": "npx prettier --write \"src/**/*.tsx\" && (npm run lint || true)"
   },
   "keywords": [

@Shahroz16
Copy link
Contributor

@zdnk thank you for reaching out and bringing this to our attention.

@claudesortwell thank you for your swift response on the temp fix for this issue, as well as PR for this. It is really appreciated.

I have created a PR #144 for the fix, which should fix this issue as well as let others run the linting on the package.

Can you please confirm if it fixes the issue for you, so i can merge and release it? Thank you for all your support.

@claudesortwell
Copy link

claudesortwell commented Jun 5, 2023

I can confirm it does work for me.

Also @Shahroz16 (i should raise an issue in https://github.com/customerio/customerio-io but it relates to the rn and your docs on your website). But your Cocoapods for some of your ios packages failed to deploy https://github.com/customerio/customerio-ios/actions/runs/5093854903/jobs/9156970027 (APN, InApp and Common) for version 2.6.1. I got stuck trying to upgrade to 2.6.1 for a while and it was never in the cocoapods source then realised this might be my issue and just used 2.6.0.

@Shahroz16
Copy link
Contributor

@claudesortwell thank you for confirming. You are correct, the deployment did seem to fail. I am checking it out.

@Shahroz16
Copy link
Contributor

Shahroz16 commented Jun 5, 2023

The fix is out 2.4.1. Apologies for the inconvenience folks and thank you for reporting.

@claudesortwell, I have noted down the cocoa pods issue and we are going to release it today.

Closing this ticket, but feel free to re-open incase you stumble upon something similar.

@levibostian
Copy link
Member

@claudesortwell CocoaPods 2.6.1 has been deployed. Thanks for pointing this out to the team.

@claudesortwell
Copy link

@levibostian @Shahroz16 Thank you both for your quick action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants