!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

202 Members
58 Servers

Load older messages


SenderMessageTime
9 Jan 2024
@julia:the-apothecary.club@julia:the-apothecary.club201B seems very... small?01:44:10
@samasaur:matrix.orgsamasauryeah it's just a little script01:44:42
@samasaur:matrix.orgsamasaur that runs pnpm run start or something 01:44:54
@julia:the-apothecary.club@julia:the-apothecary.clubwhat's the shebang point to01:44:58
@samasaur:matrix.orgsamasaurchecking now, i have managed to get into a bash shell in the docker image with coreutils on my path01:45:27
@samasaur:matrix.orgsamasaurah damn i think ur right01:46:16
@samasaur:matrix.orgsamasaur the shebang is /usr/bin/env bash and there is no /usr/bin/env 01:46:31
@julia:the-apothecary.club@julia:the-apothecary.clubprobably want to add the patchshebangs hook to your package build then01:47:06
@samasaur:matrix.orgsamasauris that a thing I can do?01:47:22
@samasaur:matrix.orgsamasaurI was just going to change the little script to point to the bash package01:47:31
@julia:the-apothecary.club@julia:the-apothecary.clubyeah that'll automatically rewrite the shebangs to point to nix store paths01:47:35
@julia:the-apothecary.club@julia:the-apothecary.club * yeah that'll automatically rewrite the shebangs to point to nix store paths, which means your script can work on-not-nix as well01:47:51
@samasaur:matrix.orgsamasaurwon't it work anyway if I point it to the nix bash01:48:24
@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

Show newer messages


Back to Room ListRoom Version: 6