!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

204 Members
59 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
12 Jan 2024
@marie:marie.cologneMariei 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 install12:10:23
@lily:lily.flowersLily 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
hmmmm alright i'll pull my laptop out in a minute and look closer
12:21:02
@lily:lily.flowersLily 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:lily.flowersLily 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:marie.cologneMarie
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:lily.flowersLily 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:lily.flowersLily 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:marie.cologneMariei used npm 9.8.112:42:57
@lily:lily.flowersLily Fosterhmm, let me retry with that one and see if i can replicate your lockfile12:44:34
@lily:lily.flowersLily Fosterwhat was the exact npm command you were using?12:45:24
@marie:marie.cologneMariejust npm install iirc12:45:39
@marie:marie.cologneMarie i just retried with npm install --package-lock-only --ignore-scripts and the entry without resolved/integrity is also there 12:47:51
@lily:lily.flowersLily Fosterokay 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:lily.flowersLily 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:lily.flowersLily 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:marie.cologneMarieweird, i'll try this on another machine13:06:02

Show newer messages


Back to Room ListRoom Version: 6