ItzCrazyKns / Perplexica

Perplexica is an AI-powered search engine. It is an Open source alternative to Perplexity AI
MIT License
16.73k stars 1.57k forks source link

Unable to fetch font #333

Closed muhammadammarzahid closed 3 months ago

muhammadammarzahid commented 3 months ago

Describe the bug

Montserrat font can not be fetched when i use docker compose. The links https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;700&display=swap works perfectly well in my browser. But When i try to build using docker compose i get the following error. I have no clue what is going on.

FetchError: request to https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;700&display=swap failed, reason: 
3.530     at ClientRequest.<anonymous> (/home/perplexica/node_modules/next/dist/compiled/node-fetch/index.js:1:66160)
3.530     at ClientRequest.emit (node:events:520:28)
3.530     at emitErrorEvent (node:_http_client:103:11)
3.530     at TLSSocket.socketErrorListener (node:_http_client:506:5)
3.530     at TLSSocket.emit (node:events:520:28)
3.530     at emitErrorNT (node:internal/streams/destroy:170:8)
3.530     at emitErrorCloseNT (node:internal/streams/destroy:129:3)
3.530     at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
3.530   type: 'system',
3.530   errno: 'ETIMEDOUT',
3.530   code: 'ETIMEDOUT'
3.530 }
5.625 Failed to compile.
5.625 
5.625 app/layout.tsx
5.625 `next/font` error:
5.625 Failed to fetch `Montserrat` from Google Fonts.

To Reproduce

  1. clone repo
  2. sudo docker compose up -d
  3. See error

Expected behavior The fonts should be fetched without any problem and build should complete.

muhammadammarzahid commented 3 months ago

Resolved with the latest update. Or it might be some weird internet connection issue.

coderyiyang commented 2 months ago

the same error. it failed to fetch google fonts even after my shutting down the firewall. canot figure out why. any suggestion bypass this FETCH process by using the default font?