| 12 Jan 2024 |
Lily Foster | In reply to @marie:marie.cologne i first tried https://github.com/jeslie0/npm-lockfile-fix, that didn't really work, so i deleted node_modules and package-lock.json and ran npm install it's still missing resolved/integrity fields for which here: https://github.com/NyCodeGHG/appium/blob/npm/package-lock.json#L22582 (and a few packages around it as well) if i regenerate the lockfile with npm 10.2.4 locally then it's all fine again. what npm version and exact npm command were you using to regenerate the lockfile? | 12:32:22 |
Lily Foster | (you also don't seem to need --ignore-scripts to get it to build fine, either. i confirmed i could run the appium workspace package's index.js as well after building) | 12:36:47 |
Marie | In reply to @lily:lily.flowers it's still missing resolved/integrity fields for which here: https://github.com/NyCodeGHG/appium/blob/npm/package-lock.json#L22582 (and a few packages around it as well) if i regenerate the lockfile with npm 10.2.4 locally then it's all fine again. what npm version and exact npm command were you using to regenerate the lockfile? oh, thats weird i'll tell you the versions in a moment | 12:37:18 |
Lily Foster | (it looks like specifying npmWorkspace = "packages/appium" doesn't work as intended because they specify their build scripts at the top-level because they use lerna and so trying to build it as a workspace with npm seems to do Bad Things. but you should be able to manually add the wrapping in postInstall i guess) | 12:40:45 |
Lily Foster | * (it looks like specifying npmWorkspace = "packages/appium" doesn't work as intended because they specify their build scripts at the top-level because they use lerna and so trying to build it as a workspace with npm seems to do Bad Things (or rather just not do the build step). but you should be able to manually add the wrapping in postInstall i guess) | 12:41:02 |
Marie | i used npm 9.8.1 | 12:42:57 |
Lily Foster | hmm, let me retry with that one and see if i can replicate your lockfile | 12:44:34 |
Lily Foster | what was the exact npm command you were using? | 12:45:24 |
Marie | just npm install iirc | 12:45:39 |
Marie | i just retried with npm install --package-lock-only --ignore-scripts and the entry without resolved/integrity is also there | 12:47:51 |
Lily Foster | okay i've got a few months old nixpkgs revision so i can try npm 9.8.1, but i still can't replicate what you're getting. idk if you need to clear both npm cache and node_modules (instead of just node_modules) or what :/ | 13:01:39 |
Lily Foster | fwiw btw, here's a derivation i'm using that makes a seemingly-usable appium bin (and package-lock.json is the version i generated myself):
{ fetchFromGitHub, buildNpmPackage, yq-go }:
let
version = "2.4.1";
in buildNpmPackage {
pname = "appium";
inherit version;
src = fetchFromGitHub {
owner = "NyCodeGHG";
repo = "appium";
# rev = "appium@${version}";
rev = "3531a7c72309b858a4b7a0b7180bfdb645c65cd1";
hash = "sha256-8RJB5MKL+N1ZbX4TUcnWUyfIdZJiG2EFkdgiQ64yJb0=";
};
npmDepsHash = "sha256-ZMeiwUEd2R54v2x0JUGhjU2MHGCRrXDiTYwA3Bk1MxY=";
nativeBuildInputs = [ yq-go ];
postPatch = ''
cp ${./package-lock.json} ./package-lock.json
yq -iPo json '. + {"bin": {"appium":"packages/appium/index.js"}}' ./package.json
'';
}
| 13:02:48 |
Lily Foster | In reply to @lily:lily.flowers okay i've got a few months old nixpkgs revision so i can try npm 9.8.1, but i still can't replicate what you're getting. idk if you need to clear both npm cache and node_modules (instead of just node_modules) or what :/ yeah even deleting my ~/.npm and node_modules and package-lock.json locally and doing npm install --package-lock-only --ignore-scripts with 9.8.1 still gets a working lockfile for me... | 13:05:45 |
Marie | weird, i'll try this on another machine | 13:06:02 |
Lily Foster | * fwiw btw, here's a derivation i'm using that makes a seemingly-usable appium bin (and package-lock.json is the version i generated myself):
{ fetchFromGitHub, buildNpmPackage, yq-go }:
let
version = "2.4.1";
in buildNpmPackage {
pname = "appium";
inherit version;
src = fetchFromGitHub {
owner = "NyCodeGHG";
repo = "appium";
# rev = "appium@${version}";
rev = "3531a7c72309b858a4b7a0b7180bfdb645c65cd1";
hash = "sha256-8RJB5MKL+N1ZbX4TUcnWUyfIdZJiG2EFkdgiQ64yJb0=";
};
npmDepsHash = "sha256-ZMeiwUEd2R54v2x0JUGhjU2MHGCRrXDiTYwA3Bk1MxY=";
nativeBuildInputs = [ yq-go ];
postPatch = ''
cp ${./package-lock.json} ./package-lock.json
'';
preConfigure = ''
yq -iPo json '. + {"bin": {"appium":"packages/appium/index.js"}}' ./package.json
'';
}
| 13:06:14 |
Marie | it works fine on another machine with latest nodejs from nixos-23.11 (also 9.8.1) | 13:28:43 |
nyanbinary | How come pnpm doesnt have tooling yet? | 15:20:26 |
nyanbinary | Bun tooling would be really nice too lol | 15:20:32 |
Lily Foster | there's no blockers besides someone actually doing it | 15:20:52 |
Cobalt | \* not just doing it once though, maintaining any new build tool(s) is also required to be done by someone (else). | 15:23:29 |
Cobalt | * \* not just doing it once though, maintaining any new build tool(s) is also required to be done by someone (else, possibly). | 15:23:46 |
nyanbinary | https://github.com/NixOS/nixpkgs/pull/265771 | 15:46:37 |
nyanbinary | nightmare blunt pr | 15:46:40 |
nyanbinary | it still doesnt build ðŸ˜so if anyone wants to help haha | 15:47:01 |
| 15 Jan 2024 |
| @kstiehl:matrix.numericas.de joined the room. | 14:41:10 |
@kstiehl:matrix.numericas.de | Hi guys, I am currently trying to update an existing package which includes a yarn build. But i get the following error message
Error: Cannot find module @rollup/rollup-linux-x64-gnu. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
at requireWithFriendlyError (/nix/store/dh3qisz023vmmhqxdr4hdcva0syjmc4i-woodpecker-ci-modules-2.1.1/node_modules/rollup/dist/native.js:64:9)
at Object.<anonymous> (/nix/store/dh3qisz023vmmhqxdr4hdcva0syjmc4i-woodpecker-ci-modules-2.1.1/node_modules/rollup/dist/native.js:73:48)
... 3 lines matching cause stack trace ...
at Module._load (node:internal/modules/cjs/loader:960:12)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)
at ModuleJob.run (node:internal/modules/esm/module_job:194:25) {
[cause]: Error: Cannot find module '@rollup/rollup-linux-x64-gnu'
Require stack:
- /nix/store/dh3qisz023vmmhqxdr4hdcva0syjmc4i-woodpecker-ci-modules-2.1.1/node_modules/rollup/dist/native.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
at Module._load (node:internal/modules/cjs/loader:922:27)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:119:18)
at requireWithFriendlyError (/nix/store/dh3qisz023vmmhqxdr4hdcva0syjmc4i-woodpecker-ci-modules-2.1.1/node_modules/rollup/dist/native.js:62:10)
at Object.<anonymous> (/nix/store/dh3qisz023vmmhqxdr4hdcva0syjmc4i-woodpecker-ci-modules-2.1.1/node_modules/rollup/dist/native.js:73:48)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/nix/store/dh3qisz023vmmhqxdr4hdcva0syjmc4i-woodpecker-ci-modules-2.1.1/node_modules/rollup/dist/native.js'
]
}
}
I can see that the package was actually downloaded. But it does not seem to present in the build step.
| 14:51:06 |
Lily Foster | can you share the derivation? | 14:52:23 |
@kstiehl:matrix.numericas.de | https://github.com/NixOS/nixpkgs/blob/23.11/pkgs/development/tools/continuous-integration/woodpecker/frontend.nix
I am trying to update the woodpecker package. And it fails in the frontend derivation.
| 14:57:46 |
Lily Foster | ah, can you share your updated derivation too? i'll try to look sometime today if no one else is able to help before i'm at my computer again | 14:58:23 |
@kstiehl:matrix.numericas.de | gimme a sec I'll create a fork of the repo real quick with my changes included | 14:59:50 |