Nix NodeJS | 198 Members | |
| 56 Servers |
| Sender | Message | Time |
|---|---|---|
| 15 Jan 2025 | ||
| After setting up my aforementioned pnpm build, I am now wondering why the devshell and build derivations behave differently. My outputs look like this:
The packaging derivation works exactly how I want it. But the devshell does not. Specifically, while in the packaging derivation all the dependencies are installed and then all I need to do is run "pnpm build" in the build phase as shown. But in the dev shell when I execute "pnpm build" pnpm complains that I need to install the dependencies still. Is there something I am missing? Is mkshell different from mkderivation in a way that prevents this? Obviously it is impure, but I'd like to confine the dependencies in the store as much as I can. | 02:58:12 | |
| it does not have the config hook. | 03:12:47 | |
| *run | 03:13:18 | |
| those setup hooks do not run when in a devshell | 03:13:37 | |
| 😔 | 03:26:03 | |
| It does download them somewhere to my store. It's just not setup so that pnpm can see the dependencies | 03:26:40 | |
| you can set that up with a shell hook | 03:39:57 | |
| good idea | 03:41:34 | |
| That does work | 03:41:43 | |
| 19:02:28 | ||
| 16 Jan 2025 | ||
| 01:28:40 | ||
Hi, can someone tell what is the preferred way of packaging a Node.js CLI in nixpkgs? Should I add it to pkgs/development/node-packages/node-packages.json or use buildNpmPackage? | 02:14:21 | |
| latter | 02:16:10 | |
| Thanks, I'm glad because I tried the first method and it wasn't working 😅 | 02:16:47 | |
Okay, followup question, the package I'm building has an npm run build script, but it's just defined as npm run lint && npm run test, should I set dontNpmBuild = true so that nix doesn't lint and test the package every time it builds? | 02:39:45 | |
| Here's the PR for the package if anyone has suggestions :) https://github.com/NixOS/nixpkgs/pull/374206 | 04:26:42 | |
| 18 Jan 2025 | ||
| 14:55:16 | ||
| Hey there. I am trying to build https://github.com/gristlabs/grist-core bad sadly I have no clue what I am doing. | 14:57:06 | |
| From perusing nixpkgs my take away was that the current best approach are yarn* hooks. | 14:57:50 | |
| So I copied the element-call derivation which seems to be doing exactly that. | 14:58:12 | |
| Now I get this error: | 14:58:26 | |
| 14:58:51 | |
*
| 14:59:03 | |
| If there are any docs about how to do this properly please let me know. | 14:59:53 | |
| The error looks surprisingliy like https://github.com/nix-community/yarn2nix/issues/111 | 15:12:27 | |
| That url is pretty clearly wrong. | 15:12:44 | |
| 19:16:59 | ||
| Hey, is there a recommended way to develop a npm/nodejs app now ? (node2nix and npmlock2nix seem unmaintained, and this post https://discourse.nixos.org/t/how-to-use-importnpmlock/53878/2 has no response) thank you all | 19:26:32 | |
ok buildNpmPackage seems to do the job | 20:21:01 | |
| 20 Jan 2025 | ||
| hey, question, any ideas why yarn would fail out trying to read /yarn/config? | 16:48:46 | |