Global Install NPM Packages on GNU Guix
++This post is not exactly a tutorial, but rather a record for myself. I've already needed to configure npm on Guix a few times and, inevitably, I ended up forgetting the steps when I installed the system again. To avoid wasting time in the future, I leave here the procedure that always solves the problem for me. +
+ ++When trying to install packages globally with npm, the error is usually this: +
+ +home@user ~/workspace/dump$ npm i --global @volar/typescript +npm error code ENOENT +npm error syscall mkdir +npm error path /gnu/store/7wn5cq17bjndjxqpzlp6icyyyfxz36bf-node-22.14.0/lib/node_modules/@volar +npm error errno -2 +npm error enoent ENOENT: no such file or directory, mkdir '/gnu/store/...' +npm error enoent This is related to npm not being able to find a file. +npm error A complete log of this run can be found in: /home/user/.npm/_logs/2025-12-05T18_11_26_115Z-debug-0.log ++
+The problem happens because Guix, like NixOS, keeps the /gnu/store directory immutable. npm tries to write there and fails. The practical solution is to redirect global packages to a directory in $HOME. +
+Step by step
+# Create a directory for global packages: +mkdir ~/.npm-global + +# Configure npm prefix: +npm config set prefix '~/.npm-global' + +# Add the new path to PATH: +export PATH="$HOME/.npm-global/bin:$PATH" + +# Confirm that the configuration has been applied: +npm config get prefix +/home/user/.npm-global + +# Install the desired package: +npm install -g @volar/typescript +added 5 packages in 1s ++
+There are other ways around this limitation, but working with npm (and other package managers) in Guix can be a bit of a pain. This simple adjustment is often enough to avoid headaches in most cases. +
+
Right now I'm using the Charybdis. It simply feels "correct" to type with it.
@@ -75,10 +71,9 @@ But at the end I think it's worth it, at least for me it is.
The other one I have (although don't use very much anymore) is the Sofle V1 that I bought from Mechboards UK.
diff --git a/blog/archive.html b/blog/archive.html
index 35cbf9a..e5719cb 100644
--- a/blog/archive.html
+++ b/blog/archive.html
@@ -13,10 +13,11 @@
-
@@ -410,10 +451,9 @@ I think it goes without saying that Suika is the perfect candidate to be the Gui
Monogatari is a text editor built with Python using the Tkinter GUI library.