From 89fa2f60db2ce6b1c5ead0412fa071c0278e35d4 Mon Sep 17 00:00:00 2001 From: 0xhenrique Date: Fri, 5 Dec 2025 18:46:43 +0000 Subject: add npm post --- ...05-global-install-npm-packages-on-gnu-guix.html | 75 +++++ blog/Nazare-Beach.html | 4 +- blog/about.html | 49 ++- blog/archive.html | 5 +- blog/index.html | 13 +- blog/internet-lurk-compilation.html | 30 +- blog/lum.html | 16 +- blog/monogatari.html | 32 +- blog/pluto-review.html | 63 ++-- blog/rss.xml | 332 +++++++++++---------- blog/tag-anime.html | 2 +- blog/tag-blog.html | 2 +- blog/tag-blogs.html | 2 +- blog/tag-clojure.html | 2 +- blog/tag-computers.html | 2 +- blog/tag-emacs.html | 4 +- blog/tag-esb.html | 4 +- blog/tag-guix.html | 8 +- blog/tag-links.html | 2 +- blog/tag-lum.html | 2 +- blog/tag-nix.html | 2 +- blog/tag-operating-systems.html | 2 +- blog/tag-photography.html | 2 +- blog/tag-portugal.html | 2 +- blog/tag-programming.html | 2 +- blog/tag-projects.html | 4 +- blog/tag-python.html | 2 +- blog/tag-review.html | 2 +- blog/tag-ricing.html | 4 +- blog/tag-travel.html | 2 +- blog/tag-wallpaper.html | 4 +- blog/tag-web.html | 27 ++ blog/tags.html | 11 +- blog/why-i-build-esb.html | 36 +-- blog/why-i-chose-guix-over-nix.html | 38 ++- blog/with-or-without-ai-we-all-lose.html | 35 +-- ...-05-global-install-npm-packages-on-gnu-guix.org | 45 +++ 37 files changed, 508 insertions(+), 361 deletions(-) create mode 100644 blog/2025-12-05-global-install-npm-packages-on-gnu-guix.html create mode 100644 blog/tag-web.html create mode 100644 posts/2025-12-05-global-install-npm-packages-on-gnu-guix.org diff --git a/blog/2025-12-05-global-install-npm-packages-on-gnu-guix.html b/blog/2025-12-05-global-install-npm-packages-on-gnu-guix.html new file mode 100644 index 0000000..1ccf313 --- /dev/null +++ b/blog/2025-12-05-global-install-npm-packages-on-gnu-guix.html @@ -0,0 +1,75 @@ + + + + + + +Global Install NPM Packages on GNU Guix + + + + + + +
+
+

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. +

+
+
+
+
My RSS Feed +
Created using GNU Emacs + Org Static Blog.
+ + diff --git a/blog/Nazare-Beach.html b/blog/Nazare-Beach.html index 485cea6..1cc4c13 100644 --- a/blog/Nazare-Beach.html +++ b/blog/Nazare-Beach.html @@ -22,7 +22,7 @@ Shame on me for not taking my camera with me that day. I'm not a fan of smartpho

-
+
ATjnpyl.jpeg
@@ -32,7 +32,7 @@ According to Wikipedia, Nazaré is one of the most traditional Portuguese fishin

-
+
GwZIh3p.jpeg
diff --git a/blog/about.html b/blog/about.html index 365b7ae..d252b8e 100644 --- a/blog/about.html +++ b/blog/about.html @@ -13,13 +13,12 @@ - +

About

- -
-

whoami

-
+
+

whoami

+

Hello there! You can call me Henrique. The main purpose of this website is to share some interesting things I find on the world wide web and the projects of mine. @@ -27,14 +26,13 @@ Some of the stuff I work on Github.

- -
-

My Computers

-
+
+

My Computers

+
-
-

ThinkPad T480

-
+
+

ThinkPad T480

+
  • OS: GNU Guix
  • DE: EXWM/XFCE4
  • @@ -44,10 +42,9 @@ Some of the stuff I work on Github.
- -
-

Xeon PC

-
+
+

Xeon PC

+
  • OS: GNU Guix
  • DE: EXWM/XFCE4
  • @@ -58,14 +55,13 @@ Some of the stuff I work on Github.
- -
-

Keyboards

-
+
+

Keyboards

+
-
-

The Charybdis by Bastard Keyboards

-
+
+

The Charybdis by Bastard Keyboards

+

vqbSpXX.jpeg 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 Sofle V1 by Mechboards UK

-
+
+

The Sofle V1 by Mechboards UK

+

O4zYPni.jpeg 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 @@ -

+

Archive

-

Managing Bookmarks the Emacs Way: Why I Built ESB

+

Global Install NPM Packages on GNU Guix

+

Managing Bookmarks in Emacs: Why I Built ESB

Pluto Review

Why I Chose Guix Over Nix

Guix Wallpapers

diff --git a/blog/index.html b/blog/index.html index d4845a1..5a547e8 100644 --- a/blog/index.html +++ b/blog/index.html @@ -13,21 +13,20 @@ - +
-

Managing Bookmarks the Emacs Way: Why I Built ESB

+

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. +

Read more...

Managing Bookmarks in Emacs: Why I Built ESB

If you are reading this, maybe you spend most of your day inside Emacs. You probably already use it for emails, RSS, file stuff, even browsing web pages. But then, why bookmarks are still stuck inside Firefox or Chrome?

Read more...

Pluto Review

I would dare to say that Pluto is an anime carried almost entirely by its direction and art, while its story leaves something to be desired in many respects. I had difficulties with the way the author approached the problems inherent in the type of narrative he chose. In this review, I won't go into the technical aspects of animation and direction since I don't have enough knowledge to evaluate them. My focus will be on the writing and storytelling.

Read more...

Why I Chose Guix Over Nix

I've been using NixOS for quite some time, but somehow I ended up with Guix. In this article I will try to write about the reasons why I don't use Nix anymore.

Read more...

Guix Wallpapers

-I've been using Guix for quite some time now. It's been a great experience so far! +I've been using Guix for quite some time now. It's been a great experience so far. Here are some wallpapers I've been collecting for my Guix desktop. -

Read more...

Monogatari - Text Editor in Python

-Monogatari is a text editor built with Python using the Tkinter GUI library. -shinobu.gif -

Read more...
diff --git a/blog/internet-lurk-compilation.html b/blog/internet-lurk-compilation.html index 98f52fb..387b1c0 100644 --- a/blog/internet-lurk-compilation.html +++ b/blog/internet-lurk-compilation.html @@ -13,13 +13,12 @@ - +

Internet Lurk Compilation #1

- -
-

General Findings

-
+
+

General Findings

+
- -
-

Neocities

-
+
+

Neocities

+
- -
-

Internet Archive Findings

-
+
+

Internet Archive Findings

+
- -
-

Websites I visit from time to time

-
+
+

Websites I visit from time to time

+