We've all been there. Some of us live there. You made code changes, and they aren't appearing in the compiled code, the locally-running web environment, or somewhere else you expect them to appear. I'll be using this list to save myself time in the future, and will be adding to it. Leave a comment with your own "Thing to Check" and I might add it!
I recently ran into an issue where a Typescript-compiled
./built folder used to generate a production build wasn't deleting old/renamed files (in the case of a folder restructure or renaming). So what ended up happening was,
./stores/SomeStore/index.js were both files that existed in the build folder, but not my project. I'd make changes to
./stores/SomeStore/index.ts but when I built for production, the application was still being built with
./stores/SomeStore.js, and none of my code changes showed up in the application until I deleted
.built and added a deletion step to my build process.
Build folders often hold compiled versions of source folder code. If you're searching for code in your project and haven't excluded build folders from search, you can easily make the mistake of editing code that will just be overwritten by the source code when you build.
Are you thinking you're on a live version of an app because the URL shows that? But really you've host-filed yourself and you're proxying your local? Maybe it's time to
vi /etc/hosts and check.
Maybe you can't see your code change because logging is turned off in certain builds, or something.
Eliezer Steinbock (FrontWork.dev)@elie2222Incredibly annoying when the bug is having set the wrong environment variable. Seems to happen a fair amount 😭
Any tips for catching these sooner? Often a case of something working locally/in testing but not in staging/prod because env vars are different.20:31 PM - 01 Nov 2020
Have you ever refreshed, over and over, the staging version of an app, when what you meant to check was your local?
Some code needs to be run at a particular path, or from a terminal that has access and permissions to certain tools. Sometimes you have to
touch a certain file to trigger a change, or you might have to spin up a new terminal.
Does the code take a while to build after every change? Are you using a viewer that doesn't refresh the data source?
LaurieNot me thinking the mutation didn't work but it's really a database viewer with a delay showing the updated table 😭17:37 PM - 14 Jun 2021
I can't tell you how many times I've rebuilt a project looking for an expected code change before noticing I haven't even saved the file I changed.
Maybe you've made a change in a feature branch but built the develop branch. Maybe you're working on a file with the right name, but you're in the wrong directory/at the wrong route. Maybe you're literally looking at the wrong file.
Árni St. Sigurðsson@beltiras@stebets Once took a colleague 5 minutes to spot a wrong case of a single letter in an environment variable name in a script. I had been looking for why the build didn't end up in the right place for 5 hours. 🤦♂️04:47 AM - 22 Apr 2020
Maybe the build failed and you're still looking at the old application. It's happened to me.
If one of these ended up getting you unstuck, or you have your own Thing to Check, leave it below!
I'm Adam, a web developer, self-published fiction author, and a sometimes somewhat humorous public speaker. I'm new to Dev, and you can follow me here or on Twitter @adamholwerda. I look forward to hearing from you!