Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jun 27, 2025

This PR fixes the "Module not found" error that occurs when running npm start in environments without internet access.

Problem

The Angular build process was failing during the font inlining step when trying to retrieve Google Fonts from https://fonts.googleapis.com/css?family=Roboto:300,400,500. This caused the build to fail with:

Error: Inlining of fonts failed. An error has occurred while retrieving https://fonts.googleapis.com/css?family=Roboto:300,400,500 over the internet.
getaddrinfo EAI_AGAIN fonts.googleapis.com

Solution

Added a configuration option to disable font optimization in the Angular production build configuration:

{
  "optimization": {
    "fonts": false
  }
}

This prevents the build process from attempting to inline external fonts during compilation, allowing the build to complete successfully in environments without internet access. The fonts will still be loaded at runtime when internet access is available.

Testing

  • Verified that npm install completes successfully
  • Confirmed that npm start now works without errors
  • Tested the complete build pipeline including library compilation and documentation generation

The fix is minimal and surgical, affecting only the font optimization behavior during build time without impacting the application's functionality.

Fixes #92.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: ng build angular-web-bluetooth-starter --configuration production (dns block)
    • Triggering command: ng build angular-web-bluetooth-starter --configuration production (dns block)
  • www.google-analytics.com
    • Triggering command: ng build @manekinekko/angular-web-bluetooth --configuration production (dns block)
    • Triggering command: ng build angular-web-bluetooth-starter --configuration production (dns block)
    • Triggering command: ng serve (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: manekinekko <1699357+manekinekko@users.noreply.github.com>
Copilot AI changed the title [WIP] Module not found Fix "Module not found" error by disabling font inlining in Angular build Jun 27, 2025
Copilot AI requested a review from manekinekko June 27, 2025 07:09
Copilot finished work on behalf of manekinekko June 27, 2025 07:09
@manekinekko manekinekko marked this pull request as ready for review June 27, 2025 07:33
@manekinekko manekinekko merged commit caa0897 into main Jun 27, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Module not found

2 participants