DEV Community

Adam Holwerda
Adam Holwerda

Posted on • Updated on

13 Things To Check When Your Code Isn't Running

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!

Do you need to blow away a build folder?

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.js and ./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.

Did you make changes in a build folder?

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 "host filed"?

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.

Environment variables obscuring debugging or removing your change?

Maybe you can't see your code change because logging is turned off in certain builds, or something.

Do you have multiple tabs/windows of the same App open, in different environments?

Have you ever refreshed, over and over, the staging version of an app, when what you meant to check was your local?

Are you in the right terminal window/folder?

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.

Is there a delay in the view?

Does the code take a while to build after every change? Are you using a viewer that doesn't refresh the data source?

Did you save the file before building?

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.

Making changes in the right branch? In the right file? In the right folder?

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.

Does your code change require other database or authentication changes?

Did you misspell something?


Did you push your code?

Are you checking build output but assuming build succeeded?

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!

Discussion (0)