npm: Cannot read property ‘resolve’ of undefined

When developing software for Node.js, I use the n package manager to manage and switch between Node versions. Recently, I needed to update my installed Node version (9.2.1) to something more recent. I ran $ sudo n latest to install 13.1.0. But after the upgrade, npm installations stopped working. Any use of npm i would error with:

ERR! Cannot read property 'resolve' of undefined

After extensive research, it turned out this was the result of an incompatibility between old versions of n (<2.1.12) and recent versions of node.

Online forums said the solution was to downgrade back to the older version of Node and be happy with that. I needed the newer Node, so this wasn’t an option. But there was a catch-22: in order to update n to a later version compatible with recent Node, I needed to use npm, which n had broken.

Here are the steps I tried that ended up working.

“Coredemptrix” vs. “Co‑redemptrix”: The Semantics of a Hyphenation

In Catholic theology, the word “Coredemptrix” (syllabified “Co‑re‑demp‑trix”) is a title sometimes applied to Mary, the mother of Jesus. But occasionally, you’ll find the word with a hyphen inserted, as in “Co‑redemptrix” (together with its much rarer case-variants: “Co‑Redemptrix” and “co‑Redemptrix”).

I find this to be fascinating from a linguistic standpoint, because the hyphen actually changes the meaning of the word. This treatise is meant to make a linguistic point, not a theological one. I’m not trying to argue for or against the title itself. But since this is a semantic inquiry, we must begin by establishing what a theologian would mean by the term.

Hello Again

It’s been a while! When I last posted, I was working as a freelance web developer. Since that time, I entered seminary and was ordained a Catholic priest. I am currently pursuing advanced theological studies. Although I wasn’t actively updating it, I held on to this longstanding personal blog of mine over the years because it continued to receive significant amounts of traffic. Now I’ve decided to freshen it up and give it a redesign, and hopefully start using it again as a place to share my interests in the areas of theology, linguistics, technology, photography, and more. Thanks for visiting!

Where’s “Scheduled Tasks” in Windows 7?

If you’re coming from a Windows XP background, you’re probably accustomed to using XP’s “Scheduled Tasks” folder to run programs at specified times or events. At first glance, it may appear Windows Vista and Windows 7 lack this functionality, since there is no “Scheduled Tasks” to be found. However, it’s still there, but under a different name: Task Scheduler.

How to Remove Dates from WordPress Posts

If your content is not time-oriented (such as when using WordPress in non-blog contexts), you may wish to remove the publication date from your posts since this information is not relevant and can give the impression that your older content is outdated.

How to Save a Word Doc as a PDF

Saving a Microsoft Word document as a PDF can be a great way to ensure that your document looks exactly the same no matter who’s viewing it and to ensure that your document can be viewed by as many computer users as possible (thanks to the ubiquity of Adobe Reader).

To export your Word document to PDF format, just follow the instructions for your version of Word:

How to Fix Missing Post Dates in Your WordPress Theme

The problem:
When you have multiple posts published on the same day, the post date only shows up for the first one when you view the posts on your site.

The fix:

  1. Go to “Appearance > Editor” and repeat the following steps for each of your theme files
  2. Look for instances of this code:
    <?php the_date(); ?>
  3. Replace that code with this code:
    <?php echo get_the_date(); ?>
  4. Click “Update File”

The explanation:
Most WordPress template tag functions that start with “the_” will merely output the values returned by their equivalent “get_the_” functions. However, “the_date()” is an exception to this standard because it adds functionality that’s not present in “get_the_date()”, namely, not outputting the same date more than once per page, which can be a feature or an annoyance depending on your desired functionality.

How to Delete an Old Email Address from Outlook Autocomplete

If you update an Outlook contact but the old email address keeps showing up in Outlook’s autofill, just follow these steps:

  1. When the old email address appears in the autocomplete box, use your up/down arrow keys to highlight the address
  2. Press the “Delete” key on your keyboard
  3. If you haven’t done so already, finish typing the contact’s name
  4. Now press Ctrl+K on your keyboard to load the new email address from your contact list

How to Change a Drive Letter in Windows XP/Vista/7

A “drive letter” is the letter that precedes paths to files on that drive. For example, C:, D:, E:, etc. Windows lets you change the drive letter of hard drives, USB flash drives, DVD drives, or other drives attached to your system if so desired. These instructions work on Windows XP, Windows Vista, and Windows 7: