-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Fix error related to Appium when installing dependencies in NPM version 7.5.2 #28849
Conversation
Size Change: 0 B Total Size: 1.36 MB ℹ️ View Unchanged
|
I've merged #28824, will rebase this PR now. |
c38522f
to
6283a1f
Compare
BTW @fluiddot, I'm not really seeing any errors/warnings about the Instead, I'm still getting the other error (about
|
Yeah I had that too, I'm not sure what's causing it, the only way I got it fixed was by running I though that it could be related to the new |
Regarding the errors with There's an opened issue on |
I checked in the NPM 7 release post that now From "Changes in npm v7":
Unless we find a workaround for this, one option would be to update the CI workflows so they have access by SSH to the forks. |
Hmm, still sounds like a bug to me. I mean |
Ah! Seems like I don't! I removed my I'm getting a diff --git a/package-lock.json b/package-lock.json
index 1fb46604ba..379e505aaf 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -72915,11 +72915,11 @@
"integrity": "sha512-ng6Tm537E/M42GjE4TRUxQyL8sRfClcL7bQWblOCoxPZzJ2J3bdALsjeG3vDnVCIfI/R0AeFalN9KjMt0+Z/Zg=="
},
"@react-native-community/masked-view": {
- "version": "git+https://[email protected]/wordpress-mobile/react-native-masked-view.git#f65a51a3320e58404d7f38d967bfd1f42b439ca9",
+ "version": "git+ssh://[email protected]/wordpress-mobile/react-native-masked-view.git#f65a51a3320e58404d7f38d967bfd1f42b439ca9",
"from": "@react-native-community/masked-view@git+https://github.com/wordpress-mobile/react-native-masked-view.git#f65a51a3320e58404d7f38d967bfd1f42b439ca9"
},
"@react-native-community/slider": {
- "version": "git+https://[email protected]/wordpress-mobile/react-native-slider.git#d263ff16cdd9fb7352b354342522ff030f220f42",
+ "version": "git+ssh://[email protected]/wordpress-mobile/react-native-slider.git#d263ff16cdd9fb7352b354342522ff030f220f42",
"from": "@react-native-community/slider@git+https://github.com/wordpress-mobile/react-native-slider.git#d263ff16cdd9fb7352b354342522ff030f220f42"
},
"@react-navigation/core": {
@@ -103911,7 +103911,7 @@
}
},
"jsdom-jscore-rn": {
- "version": "git+https://[email protected]/iamcco/jsdom-jscore-rn.git#a562f3d57c27c13e5bfc8cf82d496e69a3ba2800",
+ "version": "git+ssh://[email protected]/iamcco/jsdom-jscore-rn.git#a562f3d57c27c13e5bfc8cf82d496e69a3ba2800",
"from": "jsdom-jscore-rn@git+https://github.com/iamcco/jsdom-jscore-rn.git#a562f3d57c27c13e5bfc8cf82d496e69a3ba2800",
"requires": {
"htmlparser2-without-node-native": "^3.9.2",
@@ -113333,7 +113333,7 @@
}
},
"react-native-dark-mode": {
- "version": "git+https://[email protected]/wordpress-mobile/react-native-dark-mode.git#f09bf1480e7b34536413ab3300f29e4375edb2c6",
+ "version": "git+ssh://[email protected]/wordpress-mobile/react-native-dark-mode.git#f09bf1480e7b34536413ab3300f29e4375edb2c6",
"from": "react-native-dark-mode@git+https://github.com/wordpress-mobile/react-native-dark-mode.git#f09bf1480e7b34536413ab3300f29e4375edb2c6",
"requires": {
"@types/events": "^3.0.0",
@@ -113351,7 +113351,7 @@
}
},
"react-native-gesture-handler": {
- "version": "git+https://[email protected]/wordpress-mobile/react-native-gesture-handler.git#b80e959908b383a26d6e35d992d6d529efad0b16",
+ "version": "git+ssh://[email protected]/wordpress-mobile/react-native-gesture-handler.git#b80e959908b383a26d6e35d992d6d529efad0b16",
"from": "react-native-gesture-handler@git+https://github.com/wordpress-mobile/react-native-gesture-handler.git#b80e959908b383a26d6e35d992d6d529efad0b16",
"requires": {
"@egjs/hammerjs": "^2.0.17",
@@ -113361,14 +113361,14 @@
}
},
"react-native-get-random-values": {
- "version": "git+https://[email protected]/wordpress-mobile/react-native-get-random-values.git#f03f2c16414aff4ea76064dcd00a9e3c6efc838d",
+ "version": "git+ssh://[email protected]/wordpress-mobile/react-native-get-random-values.git#f03f2c16414aff4ea76064dcd00a9e3c6efc838d",
"from": "react-native-get-random-values@git+https://github.com/wordpress-mobile/react-native-get-random-values.git#f03f2c16414aff4ea76064dcd00a9e3c6efc838d",
"requires": {
"fast-base64-decode": "^1.0.0"
}
},
"react-native-hr": {
- "version": "git+https://[email protected]/Riglerr/react-native-hr.git#2d01a5cf77212d100e8b99e0310cce5234f977b3",
+ "version": "git+ssh://[email protected]/Riglerr/react-native-hr.git#2d01a5cf77212d100e8b99e0310cce5234f977b3",
"from": "react-native-hr@git+https://github.com/Riglerr/react-native-hr.git#2d01a5cf77212d100e8b99e0310cce5234f977b3"
},
"react-native-hsv-color-picker": {
@@ -113385,7 +113385,7 @@
"integrity": "sha512-+/bcZWFeZt0xSS/+3CHM5K7qPL4vDO/3ARLIowzFpUPGZiPsv9+NET+XNqqseRYwFJwYMmtX+Q4TZKxAVy09ew=="
},
"react-native-keyboard-aware-scroll-view": {
- "version": "git+https://[email protected]/wordpress-mobile/react-native-keyboard-aware-scroll-view.git#678a4d459caa2f7f448202574dddc6a19954500c",
+ "version": "git+ssh://[email protected]/wordpress-mobile/react-native-keyboard-aware-scroll-view.git#678a4d459caa2f7f448202574dddc6a19954500c",
"from": "react-native-keyboard-aware-scroll-view@git+https://github.com/wordpress-mobile/react-native-keyboard-aware-scroll-view.git#gb-v0.8.8",
"requires": {
"prop-types": "^15.6.2",
@@ -113393,7 +113393,7 @@
}
},
"react-native-linear-gradient": {
- "version": "git+https://[email protected]/wordpress-mobile/react-native-linear-gradient.git#52bf43077171cff8714ce3e0155f3ebb7f55bc37",
+ "version": "git+ssh://[email protected]/wordpress-mobile/react-native-linear-gradient.git#52bf43077171cff8714ce3e0155f3ebb7f55bc37",
"from": "react-native-linear-gradient@git+https://github.com/wordpress-mobile/react-native-linear-gradient.git#52bf43077171cff8714ce3e0155f3ebb7f55bc37"
},
"react-native-modal": {
@@ -113406,7 +113406,7 @@
}
},
"react-native-reanimated": {
- "version": "git+https://[email protected]/wordpress-mobile/react-native-reanimated.git#ed48f510fba751cd75da7629e92276166766be91",
+ "version": "git+ssh://[email protected]/wordpress-mobile/react-native-reanimated.git#ed48f510fba751cd75da7629e92276166766be91",
"from": "react-native-reanimated@git+https://github.com/wordpress-mobile/react-native-reanimated.git#ed48f510fba751cd75da7629e92276166766be91",
"requires": {
"fbjs": "^1.0.0"
@@ -113443,7 +113443,7 @@
}
},
"react-native-safe-area-context": {
- "version": "git+https://[email protected]/wordpress-mobile/react-native-safe-area-context.git#1e3c0d34f31b59fb79f71ec0b4c39c513f684871",
+ "version": "git+ssh://[email protected]/wordpress-mobile/react-native-safe-area-context.git#1e3c0d34f31b59fb79f71ec0b4c39c513f684871",
"from": "react-native-safe-area-context@git+https://github.com/wordpress-mobile/react-native-safe-area-context.git#1e3c0d34f31b59fb79f71ec0b4c39c513f684871"
},
"react-native-sass-transformer": {
@@ -113464,11 +113464,11 @@
}
},
"react-native-screens": {
- "version": "git+https://[email protected]/wordpress-mobile/react-native-screens.git#b3d907bda2695743f35fd874261dcd27e0912eca",
+ "version": "git+ssh://[email protected]/wordpress-mobile/react-native-screens.git#b3d907bda2695743f35fd874261dcd27e0912eca",
"from": "react-native-screens@git+https://github.com/wordpress-mobile/react-native-screens.git#b3d907bda2695743f35fd874261dcd27e0912eca"
},
"react-native-svg": {
- "version": "git+https://[email protected]/wordpress-mobile/react-native-svg.git#a628e92990a2404e30a0086f168bd2b5b7b4ce96",
+ "version": "git+ssh://[email protected]/wordpress-mobile/react-native-svg.git#a628e92990a2404e30a0086f168bd2b5b7b4ce96",
"from": "react-native-svg@git+https://github.com/wordpress-mobile/react-native-svg.git#a628e92990a2404e30a0086f168bd2b5b7b4ce96",
"requires": {
"css-select": "^2.0.2",
@@ -113550,7 +113550,7 @@
}
},
"react-native-video": {
- "version": "git+https://[email protected]/wordpress-mobile/react-native-video.git#1b964b107863351ed744fc104d7952bbec3e2d4f",
+ "version": "git+ssh://[email protected]/wordpress-mobile/react-native-video.git#1b964b107863351ed744fc104d7952bbec3e2d4f",
"from": "react-native-video@git+https://github.com/wordpress-mobile/react-native-video.git#1b964b107863351ed744fc104d7952bbec3e2d4f",
"requires": {
"prop-types": "^15.5.10" |
We might try setting |
Trying in ceee13c for the unit test workflow 🤞 |
I'm afraid it still fails 😭 . I was checking the documentation from |
Yeah, I saw that 😕
That's the default setting I think (so that's what we've been implicitly trying prior to my change). |
Right, I forced the value just in case but we should remove it since it's the default one.
Yeah but even for public repos I think you need a SSH key if you checkout via SSH, I think that's the cause for the forked repos to fail in the CI. In previous projects what I did was to have a GitHub user (like a Bot) with minimum permissions and add the SSH key as a secret to be used in the workflow. In that case it was required for private repos, I'm surprised that it could be required also for public ones 🤔 . |
I've created an example repository for reproducing the problem with CI in an empty project. The created repository is named github-actions-test and only contains a I created a PR that includes a simple workflow for testing NPM install. Unfortunately the jobs are failing with exactly the same error:
Looks like that GitHub actions can't checkout repositories via SSH unless we explicitly add an SSH key for it. I found an issue related to this in I'm thinking about different solutions for this but all of them would imply to change the way we reference them, instead of using commit hash we should use versions and therefore create releases for each one. This way we could reference the tarball URL from the release or publish it to NPM. Example of tarball URL:
|
By the time I was testing I spotted that there's a new version of NPM |
Yesss! That's great to hear! (And TBH, from your description of the underlying issue and potential workarounds, this is the only solution that makes sense IMO -- People can't be assumed to suddenly add GitHub bots with minimum permissions just to be able to install npm dependencies because of an npm bug 😅 ) |
Anyway, I'll:
|
Yeah it didn't make sense for public repos. Now the problem I'm facing is that running |
Ah I see you've already done that in ae4ee0c 🎉 |
👍
Hmm, maybe it'd be easier to start from a clean slate (i.e. fresh branch) in that case? |
Yep, I'm thinking to rebase this branch and start from scratch. |
Not sure it's worth rebasing? Looking at the PR, there are basically only two changes we'd like to keep:
We might be able to file a new PR with the appium upgrade only (performed using npm 6). This should then unblock the npm 7 upgrade, which we could even do in a separate PR 🤔 |
Yeah the reference for the dependencies with format
Yeah, makes sense to make it in two separate PRs, one for updating the |
I'm closing this PR because this issue will be addressed with the following PRs:
This is the status of this fix so far: CI failures due to not having access to some repositoriesThis has been fixed in NPM version Dependencies install errorThe original error related to #28834 has been fixed by upgrading
I've created an issue in Appium repository just in case they can fix it, although this issue is already reported in |
Addresses #28834
Description
Running
npm install
with NPM version7.5.2
produces the following error:How has this been tested?
7.5.2
(with NVM:nvm install --latest-npm
)npm install
Screenshots
N/A
Types of changes
Bug fix
Checklist: