I was writing some code for a Node.js project on my MacBook. I wrote the code, the tests passed, so I commited it to GitHub and the build pipeline did its checks.

One of the checks failed — the tests on CircleIC failed. I took a look, and stumbled across this unexpected error:

FAIL  __****s__/controllers/users.****.js
● Test suite failed to run

Cannot find module './admin' from 'index.js'

However, Jest was able to find:
'./users.js'

You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].

See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string …


A friend’s acquaintance recently passed away from Cancer. His name was Matthew, and he was a smart, nice chap doing software development, just like myself and my friend. The last time I saw him, he looked perfectly fine, so his death came as a surprise, and a wake-up call.

It is so easy to stay immersed in the daily routine of life, and never to take a step back and ask yourself if you are doing the right thing with this time that you have here. …


Since July I’ve been working in Sweden with AKQA and Volvo. It’s been a great experience to go to a different country and see what working and living in that place is like. It’s also been an opportunity to escape Brexit, albeit temporarily.

Unfortunately, the whole meatball that is Brexit remains on the plate, and requires swallowing and digestion. As a freelance developer running my tiny boutique web development studio, I have had to think hard about what to do about that oily meatball.

Working in the EU

My company is registered in the UK. If a No Deal Brexit unfolds, I might not be able to do business in the EU. Perusing through the technical notices that the UK Government compiled a few months back, two items were of particular importance to my work — financial payments between UK and EU bank accounts, and EU data protection policy. …


Stories of the 90’s explored the nature of threat and destruction. Films like Terminator 2, Independence Day and Things to Do in Denver When You’re Dead all have one common theme: a fear of death.

I say that, but the latter of the three paints a rosy picture of death, but emphasises a greater fear, a fear of being hunted down. And that is the key component; fear.

Fear is what stops us from doing things, from exploring options. Fear is a very real emotion. It is also potentially a great driver.

In some cases, fear paralyses us. It stops us from taking action, and in doing so, it limits us, and makes us sitting ducks. …


When Bitcoin was starting to get attention back in 2011, it offered an opportunity to create a currency that be used across the globe. Not only that, it offered the potential to bring banking services to people in places where banking didn’t exist. Imagine a single currency that anyone in the world could buy and sell with?

These positive benefits are getting lost in the speculation bubble that has emerged over the past 18 months, and it has exposed some of the problems of the currency:

  • Bitcoin has a tiny limit when it comes to the number of transactions per second it can process. The buildup in transactions to process means that it is beginning to take days to transfer money between wallets. …

In the award-winning documentary “The Fog of War”, former US Secretary of Defence Robert McNamara gave 11 lessons from his life and career. There’s an important moment about 1:17:38 in the film, towards the end of lesson 7. For McNamara and the US, they committed the US military in Vietnam in fear of the region turning into a Communist stronghold. As for the Vietnamese, they saw the US forces as colonial invaders.

McNamara discusses a moment in 1995 where he had met his opposing figure from the Vietnam war, general Vo Nguyen Giap. They discussed their views and reasoning on why the war happened, and what they were looking to accomplish. …


Estonia is a Baltic country that gave us the likes of Skype and Transferwise. It also offers one of the most interesting digital programmes of any country in Europe, or the world — the Estonian e-residency.

In short, this programme allows you to get ahold of an Identity card and card reader that lets you digitally sign documents online from anywhere in the world. The Identity doesn’t grant you travel rights to the country, but it does allow you to setup a business and bank account that has access to the EU single market, the very market that the UK is currently planning to leave as part of Brexit. It is also perfect for digital nomads who want to setup their business banking in Europe, but not necessarily be located there. …


Then here are a few tips:

  • Make sure you have the time to do it — you’ll need more time than you think.
  • Make mind maps, do plenty of them, so you can capture what you want to write without exhausting too much mental effort.
  • Experiment with different settings and environments for writing your book — some will be more productive than others. Sometimes music helps, sometimes it doesn’t.
  • If you’re writing a technical book, check what is happening in that space — during the course of my book, the software changed name, and gained a strong competitor, which I ended up incorporating into the book. …


It’s very easy to get engrained in the daily routine and never step back to consider where you are heading. There’s a comfort in routines that means you never have to ask some uncomfortable questions about where you are and whether you are where you want to be in life.

Suddenly you wake up and realise that you are in your thirties and a long way away from the dreams you had when you were young and full of ambition.

You wonder to yourself – why didn’t you go for your dreams? And what’s stopping you now?

Taking that step back to take stock and reflect is worthwhile. Some only do it when the new year creeps up, others when a significant event happens in their life, like the death of a loved one.

Now is a better time than any to take that opportunity.


This article has been excerpted from Cross-Platform Desktop Applications

Those who’ve used Node.js in the past may be curious about how it works in a hybrid desktop application environment such as NW.js or Electron. The truth is it’s not that different from how it already works in server-side applications, but there are a few items of difference, and to understand what those are and why this is the case, we’ll start by looking at the way Node.js is integrated into NW.js.

Where Node.js fits into NW.js

NW.js’ architecture consists of several components, Node.js being one of them. The way that NW.js makes use of Node.js is to provide a way to access the computer’s file system and other resources that’d otherwise be unavailable due to web browser security. …

About

Paul Jensen

Founder of Anephenix, and author of “Cross Platform Desktop Applications”.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store