<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Williams Favour</title>
    <description>The latest articles on DEV Community by Williams Favour (@hooplordz).</description>
    <link>https://dev.to/hooplordz</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4039804%2Fa54b14e2-9f28-450b-9f16-5895fa628f17.jpg</url>
      <title>DEV Community: Williams Favour</title>
      <link>https://dev.to/hooplordz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hooplordz"/>
    <language>en</language>
    <item>
      <title>Smash Story: The Missing Module That Brought My Backend to a Halt</title>
      <dc:creator>Williams Favour</dc:creator>
      <pubDate>Tue, 21 Jul 2026 09:58:42 +0000</pubDate>
      <link>https://dev.to/hooplordz/smash-story-the-missing-module-that-brought-my-backend-to-a-halt-2he2</link>
      <guid>https://dev.to/hooplordz/smash-story-the-missing-module-that-brought-my-backend-to-a-halt-2he2</guid>
      <description>&lt;h2&gt;
  
  
  Project Overview
&lt;/h2&gt;

&lt;p&gt;I was building the backend for a web application using &lt;strong&gt;Node.js&lt;/strong&gt; and Express. The goal was straightforward: create a scalable REST API that would later power authentication and other application features. Everything seemed properly configured until I attempted to start the server.&lt;/p&gt;

&lt;p&gt;Instead of seeing my application running, I was greeted with an error indicating that Express could not be found.&lt;/p&gt;

&lt;p&gt;At first, it seemed like a simple installation issue. It turned out to be much more educational than that.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Running the development server immediately failed with an error similar to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: Cannot find module 'express'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Despite having already installed Node.js, the application refused to start.&lt;/p&gt;




&lt;h2&gt;
  
  
  Investigation
&lt;/h2&gt;

&lt;p&gt;Rather than reinstalling everything immediately, I approached the issue methodically.&lt;/p&gt;

&lt;p&gt;First, I verified that Node.js was correctly installed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node &lt;span class="nt"&gt;-v&lt;/span&gt;
npm &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both commands worked as expected.&lt;/p&gt;

&lt;p&gt;Next, I inspected the project's structure and confirmed that the &lt;code&gt;package.json&lt;/code&gt; file existed and contained Express as a dependency.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"dependencies"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"express"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"^5.x"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Everything looked correct.&lt;/p&gt;

&lt;p&gt;I then realized the actual dependencies had never been installed inside the project directory.&lt;/p&gt;

&lt;p&gt;Running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;generated the missing &lt;code&gt;node_modules&lt;/code&gt; folder.&lt;/p&gt;

&lt;p&gt;However, the application still failed because I was starting the server from the wrong working directory.&lt;/p&gt;

&lt;p&gt;After navigating into the correct project folder and restarting the application, everything worked exactly as expected.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Fix
&lt;/h2&gt;

&lt;p&gt;The solution involved three steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Verify the runtime environment.&lt;/li&gt;
&lt;li&gt;Install all project dependencies using &lt;code&gt;npm install&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Launch the application from the correct project directory.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After these changes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;started the Express server successfully.&lt;/p&gt;




&lt;h2&gt;
  
  
  Impact
&lt;/h2&gt;

&lt;p&gt;Although the bug itself was relatively small, solving it reinforced an important engineering lesson.&lt;/p&gt;

&lt;p&gt;Many development issues are not caused by faulty code but by inconsistencies in the development environment. Carefully validating assumptions, checking dependencies, and verifying the execution context proved more effective than repeatedly rewriting code.&lt;/p&gt;

&lt;p&gt;This experience also encouraged me to adopt a more systematic debugging process:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Verify the environment first.&lt;/li&gt;
&lt;li&gt;Reproduce the issue consistently.&lt;/li&gt;
&lt;li&gt;Test one assumption at a time.&lt;/li&gt;
&lt;li&gt;Confirm the fix before moving on.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those habits have continued to improve the reliability of my development workflow.&lt;/p&gt;




&lt;h2&gt;
  
  
  Lessons Learned
&lt;/h2&gt;

&lt;p&gt;One of the biggest lessons I took away is that debugging is less about guessing and more about gathering evidence.&lt;/p&gt;

&lt;p&gt;A clear, structured troubleshooting process often solves problems faster than making random changes. Since then, I have become much more intentional about checking project configuration, dependency management, and execution context before assuming the application logic is at fault.&lt;/p&gt;

&lt;p&gt;Every bug teaches something. This one taught me that disciplined debugging is just as valuable as writing new code.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>bugsmash</category>
    </item>
  </channel>
</rss>
