Development

Fixing “error: cannot find module semver” error in Node.js

Fixing “error: cannot find module semver” error in Node.js

  • October 19, 2023

When installing a package using npm, you might encounter the “error: cannot find module semver” error. The error is caused because of a corrupted package-lock.json or yarn.lock. The most common reason for this is a change in the node version. Fixing “error: cannot find module semver” The fix is a...

Fix “Error:0308010C:digital envelope routines::unsupportedFixing” in Node.js

Fix “Error:0308010C:digital envelope routines::unsupportedFixing” in Node.js

  • October 17, 2023

Node 17 introduced OpenSSL v3.0, which brought in some breaking changes, and the “Error: error:0308010C:digital envelope routines::unsupported” is a result of one such change. It can be solved by passing in a “–openssl-legacy-provider” flag when running the application. Setting the NODE_OPTIONS environment variable We can set the environment variable that...

How to reload zsh configuration

How to reload zsh configuration

  • September 26, 2023

I have been using zsh for quite some time now and learned something new while setting up some commands today. I was trying to reload zsh configuration after making some changes. I knew it was a source command but did not remember the complete one. So I googled and found...

How to sort a Set in JavaScript

How to sort a Set in JavaScript

  • November 26, 2022

ES6 introduced the set data structure in JavaScript. But sets are not ordered abstract data structures. So there is no .sort() property available on them. To sort a Set in JavaScript, we need to convert it into an array first. Since arrays are sortable, we will then sort them, and...

Debugging CSS scroll using one simple style

Debugging CSS scroll using one simple style

  • November 18, 2022

I have been doing a lot of complicated front-end work off lately and that always brings me back to the class conundrum of which element was adding a horizontal/vertical scroll to my page/elements. Debugging CSS scroll is a pain that I have felt too many times now and I always...

CSS :has a parent selector now

CSS :has a parent selector now

  • November 12, 2022

CSS now includes a :has selector that allows us to apply styles on the basis of what is happening inside an element. Often referred to as a parent seletor, the :has() function allows us to achieve this and more. Let us take a look at this relative selector. It only...