| 3 Jan 2024 |
Lily Foster | oh | 13:35:18 |
Lily Foster | uhh | 13:35:19 |
Lily Foster | you'll need to actually manually configure npm then unless we added an escape hatch to only have the hook do npm setup and not do dep build | 13:35:45 |
@janne.hess:helsinki-systems.de | Couldn't I also move the files in the FOD around so it's compatible with what fetchNpmDeps returns? | 13:36:23 |
Lily Foster | here's the magic for that part: https://github.com/NixOS/nixpkgs/blob/d120d3076257ce88d0c35e61b729dcb55c88c642/pkgs/build-support/node/build-npm-package/hooks/npm-config-hook.sh#L17-L18 | 13:36:53 |
Lily Foster | In reply to @janne.hess:helsinki-systems.de Couldn't I also move the files in the FOD around so it's compatible with what fetchNpmDeps returns? doubtful if it's a yarn FOD | 13:36:59 |
Lily Foster | yarn doesn't do dep trees the same. and npm won't work to build deps without a npm lockfile anyway | 13:37:24 |
@janne.hess:helsinki-systems.de | In reply to @lily:lily.flowers yarn doesn't do dep trees the same. and npm won't work to build deps without a npm lockfile anyway yeah I just figured that out :/ | 13:38:27 |
Lily Foster | In reply to @lily:lily.flowers here's the magic for that part: https://github.com/NixOS/nixpkgs/blob/d120d3076257ce88d0c35e61b729dcb55c88c642/pkgs/build-support/node/build-npm-package/hooks/npm-config-hook.sh#L17-L18 and here's where those two get defined: https://github.com/NixOS/nixpkgs/blob/d120d3076257ce88d0c35e61b729dcb55c88c642/pkgs/build-support/node/build-npm-package/hooks/default.nix#L17-L18 | 13:38:47 |
Lily Foster | * and here's where those two get defined: https://github.com/NixOS/nixpkgs/blob/d120d3076257ce88d0c35e61b729dcb55c88c642/pkgs/build-support/node/build-npm-package/hooks/default.nix#L17-L18 | 13:38:56 |
Lily Foster | if you define them similarly it should work | 13:39:03 |
@janne.hess:helsinki-systems.de | so this?
export NIX_NODEJS_BUILDNPMPACKAGE=1 export npm_config_node_gyp="${nodejs}/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js";
| 13:40:38 |
Lily Foster | not the buildNpmpackage part | 13:40:51 |
Lily Foster | probably | 13:40:54 |
Lily Foster | it's not actually using npm, right? | 13:41:07 |
@janne.hess:helsinki-systems.de | I hope not | 13:41:22 |
Lily Foster | and you do need nodedir too | 13:41:31 |
@janne.hess:helsinki-systems.de | I had another package recently that needed yarn, npm and node | 13:41:34 |
Lily Foster | In reply to @janne.hess:helsinki-systems.de I hope not (that var just activates a sleeper agent we installed in npm to fix some of its broken behavior and inject vars when their fetcher lib re-execs the entirety of npm for git deps........) | 13:42:17 |
Lily Foster | In reply to @lily:lily.flowers (that var just activates a sleeper agent we installed in npm to fix some of its broken behavior and inject vars when their fetcher lib re-execs the entirety of npm for git deps........) (their coherence model for the moving parts of npm is utterly hecked) | 13:42:51 |
@janne.hess:helsinki-systems.de | TIL about srcOnly | 13:44:27 |
@janne.hess:helsinki-systems.de | In reply to @lily:lily.flowers (that var just activates a sleeper agent we installed in npm to fix some of its broken behavior and inject vars when their fetcher lib re-execs the entirety of npm for git deps........) obviously :D | 13:44:47 |
Lily Foster | In reply to @lily:lily.flowers (that var just activates a sleeper agent we installed in npm to fix some of its broken behavior and inject vars when their fetcher lib re-execs the entirety of npm for git deps........) (and it re-execs npm without necessarily even ensuring lockfiles are coherent in the git dep and requiring them since it doesn't lock those needed deps in the original lockfile. and npm loves to silently get spooked, ignore the lockfile, and try to redownload literally everything..........) | 13:45:32 |
Lily Foster | (oh and don't forget it drops the passed options when it re-execs. i mean come on, who needs those?) | 13:46:18 |
Lily Foster | (at least they set an env var to ensure they don't accidentally recurisvely re-exec npm with no end, right?) | 13:46:39 |
Lily Foster | (ugh npm makes me sad) | 13:46:44 |
Lily Foster | (sorry for rant...) | 13:46:50 |
@janne.hess:helsinki-systems.de | In reply to @lily:lily.flowers (ugh npm makes me sad) try yarn, might make you sadder | 13:47:30 |
Lily Foster | In reply to @janne.hess:helsinki-systems.de try yarn, might make you sadder i doubt that tbh. sure it's missing some stuff we want for reproducibility, but at least it felt somewhat more intelligently designed | 13:48:04 |
@janne.hess:helsinki-systems.de | In reply to @lily:lily.flowers i doubt that tbh. sure it's missing some stuff we want for reproducibility, but at least it felt somewhat more intelligently designed
➤ 8;;https://yarnpkg.com/advanced/error-codes#yn0060---incompatible_peer_dependencyYN00608;;: │ vitest@npm:0.34.6 [f9b2d] provides @types/node (pe6001) with version 16.9.1, which doesn't satisfy what vite requests
| 13:48:19 |