Category: JS
-

Expo run:ios fails with something went wrong in the podfile (in VSCode terminal)
I was trying to create a dev build for an expo app locally by running npx expo run:ios, but this kept failing with the following error: After some time spent debugging, installing a newer ruby version, re-installing cocoapods and nuking whatever cache I could think of, it turned out to be due to the VS…
-

Debugging React Unit Tests in a Monorepo with NX
After using NX for over a year, it’s frustrating that there is very sparse documentation on debugging with VSCode or using it with React. I finally decided to dig into setting up my debugging profile for our unit tests (because I was fed up with console.log – ing them). I found this YouTube video by…
-

Missing Response.statusText under HTTPS (e.g. Unauthorized is empty string)
We have a generic error handling, that shows an error to the user when a request fails. The error contains information on when it happened, and the status text of the response. (response.statusText). Recently we discovered that the statusText was missing in the screenshot of one our the reported bugs. It turned out that response.statusText…
-

Translating strings containing html with react-i18next
We do a lot of React and a lot of translating. Our library of choice for internationalization is react-i18next. Recently we faced a challenge – we needed to render a text with dynamic text inside (based on local variables) but also needed some extra formatting – like a bold text of these specific values. When…
-
NX Dev: neverConnectToCloud is true but NX still connects to the cloud
We are using nx for one of our projects, and it is advocating for enabling the nx-cloud cache. This is fine until you find out you need to claim the workspace and do things you don’t care about. If you fail to do so up to 7 days from the creation time, the builds are…
-
Updating an AzureFunction from Node 14
To update an Azure Function from Node JS 14 to 18LTS, you need to: Backstory Microsoft is deprecating support for Nodejs 14 LTS in Azure Functions, so I needed to update the ones that used it. I went on and tried to update the Node version from the Function App configuration, but the dropdown allowed…
-
Adb reverse gives the error: more than one device/emulator
When debugging a ReactNative app on a physical Android device, one can get an error that the device cannot connect to Metro. Usually, the error is related to the port forwarding not being set up (the laptop port 8081 should be exposed to the device port 8081). When you have more than 1 device connected…
-
NX Dev Not Replacing an Environment Variable in a React Project
TL;DR: %ENV_VAR% => %NX_ENV_VAR% We are using nx.dev to build a set of apps and libraries for one of our clients. Recently we found out that a CI/CD script we use to set the version number in the index.html file of the react apps was not working. It simply appends a GET parameter to a…
-

NX.dev – Problems with buildable libraries.
We are building a shared UI platform for one of our clients where we decided to store the code in a monorepo and use nx.dev to help us with the code organisation, dependencies, builds, etc. When trying to set up the common libraries of the project as publishable (and buildable) libs, we run into compilation…
