AlanGarcíaOrbit
EN ↗
[email protected] ↗

It built on my machine. A clean checkout did not

A local file missing from Git broke the previous portfolio build. How I traced the dependency and prepared a fallback without credentials.

Alan García4 min read
Two boxes of paper components, one complete and one with a missing slot, linked by green thread

The build message pointed to an unresolved import: the old portfolio’s weather service needed a configuration file.

That file existed on my machine. It was absent from a clean checkout because its directory was excluded from Git.

The error appeared while building the new version. That made it necessary to trace the process further: why was an Astro application failing because of an Angular file?

The previous version was still part of the delivery

When renewing the site, I chose to keep the previous portfolio at its own route. That meant more than storing its source in a folder. The build also prepared it to be served on the same domain.

A local dependency in that older project could therefore stop the entire build. The new page did not import the service, but its delivery included another build that needed it.

Finding that relationship located the problem. Changing an Astro import would not resolve it.

An ignored file can still be required

Keeping private configuration out of the repository makes sense. The problem was having no alternative when the file was missing.

I did not need to publish a key to resolve the import. I needed to define the minimum configuration that could exist without credentials and which capabilities should remain available in that case.

That distinction avoids treating a local file as a guaranteed part of the shared code.

Checkout without local configuration, fallback preparation and verified build
Editorial process diagram, not a screenshot or a measurement of results. Enlarge diagram ↗

Prepare a fallback without replacing what I have

The solution adds preparation that creates a fallback file only when it is missing. Existing local configuration is preserved.

The fallback contains the structure the service expects and leaves keys empty. The archived weather service now detects a missing key before requesting location or making an invalid request.

That allows the historical application to compile, but does not activate its weather provider. The new site uses a separate integration and does not depend on that configuration.

I wanted both a reproducible build and honest behavior when a capability is not configured.

Check the scenario that failed

Running the build again only in my working directory would not have been enough. It still contained the file missing elsewhere.

To review the fix, an isolated source copy without the configuration directory was prepared. The fallback was created and Angular built with it. A preparation test was added too: create when absent and preserve when present.

The new version’s build and output audit also passed afterwards. These are local checks; they do not establish that the remote workflow has passed since uploading the change.

AI helped trace the dependency

AI helped inspect the scripts, connect the import to the ignored file and prepare a small correction. What mattered was checking that explanation against the actual build path.

An answer that only said “create environment.ts” would leave questions open: with what content, where, when and what happens if I already have one?

Those questions are useful for other adjustments too. Resolving the visible error is the start. I need to understand which conditions I am adding so it does not reappear elsewhere.

Think about starting without my working directory

A clean checkout does not carry my machine’s history. It does not bring ignored files or decisions I never wrote down.

I want build requirements to be in the repository or have a clear preparation step. If a capability requires extra configuration, I want it distinguishable from the rest without blocking the entire delivery.

That is what I want to retain from this failure: when something works locally, I still need to ask how much depends on what I already had installed or saved. That question also connects with the notes I leave for returning to a project.

#build#configuration#angular#learning

AN IDEA TO SHARE

Digital Craft field notes / 12
← What I ask of a test before trusting it

Diagram detail

TIME / UTC−6

America/Mexico_City · UTC−6
THE WEATHER, NOW
— °CCheck current weather

Default city · location is used only when requested.

Data: Open-Meteo · CC BY 4.0

The Americas, Mexico and Mexico CityMexico is highlighted with a marker at Mexico City, the clock’s time zone. This is not your location.
A POINT ON THE MAP19.43° N / 99.13° W · UTC−6