| 9 Jan 2024 |
@julia:the-apothecary.club | I think docker run -it <imagename> /bin/sh should do that | 01:37:06 |
samasaur | ah so the other issue is that /bin/sh and /bin/bash don't exist in this container | 01:38:30 |
samasaur | okay here's what's in the docker image | 01:41:41 |
samasaur |  Download image.png | 01:41:51 |
@julia:the-apothecary.club | 201B seems very... small? | 01:44:10 |
samasaur | yeah it's just a little script | 01:44:42 |
samasaur | that runs pnpm run start or something | 01:44:54 |
@julia:the-apothecary.club | what's the shebang point to | 01:44:58 |
samasaur | checking now, i have managed to get into a bash shell in the docker image with coreutils on my path | 01:45:27 |
samasaur | ah damn i think ur right | 01:46:16 |
samasaur | the shebang is /usr/bin/env bash and there is no /usr/bin/env | 01:46:31 |
@julia:the-apothecary.club | probably want to add the patchshebangs hook to your package build then | 01:47:06 |
samasaur | is that a thing I can do? | 01:47:22 |
samasaur | I was just going to change the little script to point to the bash package | 01:47:31 |
@julia:the-apothecary.club | yeah that'll automatically rewrite the shebangs to point to nix store paths | 01:47:35 |
@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 well | 01:47:51 |
samasaur | won't it work anyway if I point it to the nix bash | 01:48:24 |
samasaur | * won't it work anyway if I point it to the nix bash? | 01:48:25 |
@julia:the-apothecary.club | it'd work, just not if you don't have nix? which you may or may not care about | 01:49:04 |
samasaur | it 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 it | 01:49:53 |
@julia:the-apothecary.club | ok | 01:50:14 |
samasaur | i 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 all | 01:50:15 |
samasaur | okay well it did NOT work | 01:53:49 |
samasaur | however | 01:53:51 |
samasaur | * okay well it did NOT work, i got the same error | 01:54:20 |
samasaur | when i entered a shell in that new container and ran the script via bash directly, i got a different error | 01:54:22 |
samasaur | 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 | pnpm needs /tmp to exist? | 01:54:44 |
samasaur | okay regardless of my Docker woes, the package is now building and running! thanks julia! | 02:12:27 |
@julia:the-apothecary.club | :) | 02:18:29 |