Tag: Node.js
-
Including Dev Dependencies in a DigitalOcean App Platform Build
When working with dependencies in a DigitalOcean App Platform build, there are time when you may need to include development dependencies. Such instances arise when you’re using something like TypeScript, which you’d typically have listed in your devDependencies because it’s not a necessary dependency once you’ve transpiled your code and shipped it to production. Out…
-
How to install Node.js 22 on Ubuntu
The latest release of Node.js, which will be LTS later this year, is out. Even if you’re running the shiny new Ubuntu LTS release, you’re already behind. Never fear, it’s very easy to install Node.js 22 via the APT package manager on Ubuntu with a few simple commands. As mentioned previously, I still very much…
-
Mocha tests hang after tests have finished
Recently, while revisiting a Node.js repository I haven’t contributed to in ages, I encountered a new problem: the Mocha tests would hang instead of exiting. When I asked about the error, it seems it was recently introduced and nobody had pursued tracking down the root cause of the issue. Conveniently, this issue was only happening…
-
How to install Node.js 21 on Ubuntu
Installing Node.js 21 on Ubuntu is a pretty simple task regardless if you’re targeting an LTS or a non-LTS release. Personally, when working with Ubuntu in production environments, I stick to LTS releases like Ubuntu 20.04 LTS and Ubuntu 22.04 LTS. This guide should work well on Ubuntu 22.10 and Ubuntu 23.10 as well. Installing…
-
How to install Node.js 20 on Ubuntu 20.04 LTS
Less than a week ago, Node.js 20 release. While it’s not the current LTS release, it will be this coming October 2023. You’re probably wondering why this post is about Ubuntu 20.04 LTS considering there is a newer LTS release and multiple non-LTS releases that I could be targeting. Kinda…
-
Node.js REPL history
Node.js has included a persistent history with it’s REPL (real-eval-print loop) for quite some time now. It’s a fantastic quality of life feature, and it even supports reverse-i-search. The other day, I got to wondering, where the heck does this history even live? Turns out, it’s just living in a…
-
Convert a buffer to a string in Node.js
Buffers are powerful stuff. They make it easy to work with raw binary data, and streaming data can leverage them. Many third-party Node.js dependencies leverage buffers in one way or another, especially libraries dealing with data transport. So what the heck are we supposed to do with a Buffer when…
-
How to install Node.js 19 on Ubuntu 20.04 LTS
Periodically, I check my site analytics to see which posts are getting the most traffic. It never ceases to amaze me at how many posts documenting older versions of Ubuntu, as far back as 16.04 LTS, still receive regular traffic. While they may not be evergreen forever, there’s something to…
-
Using paths to create hierarchies in Parameter Store
Parameter Store only supports a limited number of character for the parameter name. As per the error message you’re presented with, Only a mix of letters, numbers and the following 3 symbols .-_ are allowed. What that error fails to mention is that you can actually use a fourth symbol,…
-
Getting String and SecureString Parameter Store parameters with Node.js
Parameter Store has slowly become one of my favorite things about AWS. It makes it easy to share things between ECS tasks and services, and Lambdas. The parameters can be references inside of a CodeBuild buildspec file, and it’s all language agnostic, which is handy if you are running different…