!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

194 Members
56 Servers

Load older messages


SenderMessageTime
9 Jan 2024
@samasaur:matrix.orgsamasaur * won't it work anyway if I point it to the nix bash?01:48:25
@julia:the-apothecary.club@julia:the-apothecary.clubit'd work, just not if you don't have nix? which you may or may not care about01:49:04
@samasaur:matrix.orgsamasaurit should work, i think. because either you are building the package from the nix definition, in which case you have nix, or you are using this docker image, which will have that nix bash in it01:49:53
@julia:the-apothecary.club@julia:the-apothecary.clubok01:50:14
@samasaur:matrix.orgsamasauri guess it wouldn't work if you built it using npm normally but if you do that then you wouldn't have the script at all01:50:15
@samasaur:matrix.orgsamasaurokay well it did NOT work01:53:49
@samasaur:matrix.orgsamasaurhowever01:53:51
@samasaur:matrix.orgsamasaur * okay well it did NOT work, i got the same error01:54:20
@samasaur:matrix.orgsamasaurwhen i entered a shell in that new container and ran the script via bash directly, i got a different error01:54:22
@samasaur:matrix.orgsamasaur
node:fs:2707
      const stats = binding.lstat(baseLong, true, undefined, true /* throwIfNoEntry */);
                            ^

Error: ENOENT: no such file or directory, lstat '/tmp'
    at Object.realpathSync (node:fs:2707:29)
    at ../node_modules/.pnpm/temp-dir@2.0.0/node_modules/temp-dir/index.js (/nix/store/8qslh432jhm1yc212fqmvvw930b3xpc8-pnpm-8.10.5/lib/node_modules/pnpm/dist/pnpm.cjs:106975:19)
    at __require (/nix/store/8qslh432jhm1yc212fqmvvw930b3xpc8-pnpm-8.10.5/lib/node_modules/pnpm/dist/pnpm.cjs:12:50)
    at ../node_modules/.pnpm/tempy@1.0.1/node_modules/tempy/index.js (/nix/store/8qslh432jhm1yc212fqmvvw930b3xpc8-pnpm-8.10.5/lib/node_modules/pnpm/dist/pnpm.cjs:108087:19)
    at __require (/nix/store/8qslh432jhm1yc212fqmvvw930b3xpc8-pnpm-8.10.5/lib/node_modules/pnpm/dist/pnpm.cjs:12:50)
    at ../env/node.fetcher/lib/index.js (/nix/store/8qslh432jhm1yc212fqmvvw930b3xpc8-pnpm-8.10.5/lib/node_modules/pnpm/dist/pnpm.cjs:108207:36)
    at __require (/nix/store/8qslh432jhm1yc212fqmvvw930b3xpc8-pnpm-8.10.5/lib/node_modules/pnpm/dist/pnpm.cjs:12:50)
    at ../env/plugin-commands-env/lib/node.js (/nix/store/8qslh432jhm1yc212fqmvvw930b3xpc8-pnpm-8.10.5/lib/node_modules/pnpm/dist/pnpm.cjs:109388:26)
    at __require (/nix/store/8qslh432jhm1yc212fqmvvw930b3xpc8-pnpm-8.10.5/lib/node_modules/pnpm/dist/pnpm.cjs:12:50)
    at ../env/plugin-commands-env/lib/envRemove.js (/nix/store/8qslh432jhm1yc212fqmvvw930b3xpc8-pnpm-8.10.5/lib/node_modules/pnpm/dist/pnpm.cjs:109606:18) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'lstat',
  path: '/tmp'
}

Node.js v21.5.0
01:54:37
@samasaur:matrix.orgsamasaur pnpm needs /tmp to exist? 01:54:44
@samasaur:matrix.orgsamasaurokay regardless of my Docker woes, the package is now building and running! thanks julia!02:12:27
@julia:the-apothecary.club@julia:the-apothecary.club:)02:18:29
@samasaur:matrix.orgsamasaur I figured it out! the exec format error was because the executable script started with a newline before the shebang, and I think I fixed the other errors by having NextJS output a standalone JS file 11:29:08
10 Jan 2024
@9hp71n:matrix.orgghpzin changed their display name from 9hp71n to ghpzin.06:33:17
12 Jan 2024
@marie:marie.cologneMarie

I'm currently trying to package appium. I already regenerated upstreams lockfile because it's missing resolved and integrity fields.
It still tries to download the which package and I can't figure out why.

npm ERR! code ENOTCACHED
npm ERR! request to https://registry.npmjs.org/which failed: cache mode is 'only-if-cached' but no cached response is available.
{ fetchFromGitHub, buildNpmPackage }:
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=";
  };

  npmFlags = ["--ignore-scripts" "--loglevel=verbose"];
  dontNpmBuild = true;

  npmDepsHash = "sha256-fowuglaq6fo/d8zfEjBTqtLZFpDhwMYXWKM+kLYaOe0=";
}
11:10:43
@marie:marie.cologneMarie *

I'm currently trying to package appium. I already regenerated upstreams lockfile because it's missing resolved and integrity fields.
It still tries to download the which package and I can't figure out why.

npm ERR! code ENOTCACHED
npm ERR! request to https://registry.npmjs.org/which failed: cache mode is 'only-if-cached' but no cached response is available.
{ fetchFromGitHub, buildNpmPackage }:
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=";
  };

  npmFlags = ["--ignore-scripts" "--loglevel=verbose"];
  dontNpmBuild = true;

  npmDepsHash = "sha256-fowuglaq6fo/d8zfEjBTqtLZFpDhwMYXWKM+kLYaOe0=";
}
11:11:02
@marie:marie.cologneMariehm this looks a lot like this issue: https://github.com/NixOS/nixpkgs/issues/25387911:56:47
@lily:lily.flowersLily Foster
In reply to @marie:marie.cologne

I'm currently trying to package appium. I already regenerated upstreams lockfile because it's missing resolved and integrity fields.
It still tries to download the which package and I can't figure out why.

npm ERR! code ENOTCACHED
npm ERR! request to https://registry.npmjs.org/which failed: cache mode is 'only-if-cached' but no cached response is available.
{ fetchFromGitHub, buildNpmPackage }:
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=";
  };

  npmFlags = ["--ignore-scripts" "--loglevel=verbose"];
  dontNpmBuild = true;

  npmDepsHash = "sha256-fowuglaq6fo/d8zfEjBTqtLZFpDhwMYXWKM+kLYaOe0=";
}
how did you regenerate upstream's lockfile? (like by what steps?)
12:09:26
@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

Show newer messages


Back to Room ListRoom Version: 6