Local web build fails with no Internet connection
See original GitHub issueWhere to find the issue
This repository https://github.com/corona-warn-app/cwa-website.
Describe the issue
Attempting to build a local copy of the web to test, when no internet connection is available, fails with an error message:
FetchError: request to https://obs.eu-de.otc.t-systems.com/obs-public-dashboard/json/v1/nested_cwa_public_dashboard_data.json failed, reason: getaddrinfo ENOTFOUND obs.eu-de.otc.t-systems.com
Another error occurs if there is an internet connection but the json file cannot be fetched fast enough. Unfortunately I didn’t save this error message. The error message is something like public//analyseData.json
not found.
Steps to reproduce
- On a local system enable flight mode i.e. no internet connection
- Type
npm start
at a bash command prompt
$ npm start
> corona-warn-app-landingpage@1.0.0 start C:\Users\mikem\github\cwa-website
> gulp
[19:04:49] Using gulpfile ~\github\cwa-website\gulpfile.js
[19:04:49] Starting 'default'...
[19:04:49] Starting 'build'...
[19:04:49] Starting 'clean'...
[19:04:49] Finished 'clean' after 15 ms
[19:04:49] Starting 'cleanBlogs'...
[19:04:49] Finished 'cleanBlogs' after 83 ms
[19:04:49] Starting 'cleanScienceBlogs'...
[19:04:49] Finished 'cleanScienceBlogs' after 5.5 ms
[19:04:49] Starting 'buildBlogFiles'...
[19:04:50] Finished 'buildBlogFiles' after 681 ms
[19:04:50] Starting 'buildScienceBlogFiles'...
[19:04:50] Finished 'buildScienceBlogFiles' after 352 ms
[19:04:50] Starting 'analyseData'...
[19:04:50] 'analyseData' errored after 85 ms
[19:04:50] FetchError: request to https://obs.eu-de.otc.t-systems.com/obs-public-dashboard/json/v1/nested_cwa_public_dashboard_data.json failed, reason: getaddrinfo ENOTFOUND obs.eu-de.otc.t-systems.com
at ClientRequest.<anonymous> (C:\Users\mikem\github\cwa-website\node_modules\node-fetch\lib\index.js:1483:11)
at ClientRequest.emit (events.js:400:28)
at ClientRequest.emit (domain.js:470:12)
at TLSSocket.socketErrorListener (_http_client.js:475:9)
at TLSSocket.emit (events.js:400:28)
at TLSSocket.emit (domain.js:470:12)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:82:21)
[19:04:50] 'build' errored after 1.23 s
[19:04:50] 'default' errored after 1.23 s
Expected behavior
It should be possible to build the web reproducibly using a clone of the repository without downloading any dynamic information from another source, therefore it should be possible to build the web without an internet connection.
Suggested change
Remove the reliance on accessing a remote file during build which is not part of the committed git controlled repository on https://github.com/corona-warn-app/cwa-website.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
@dsarkar / @brifemu
I tested successfully on Windows 10 in flight mode.
npm start
completes the build successfully and runs the webserverAlso the http://localhost:8000/de/analysis/ page shows data and can be used to test this page.
Thank you very much for addressing this!
@MikeMcC399 FYI PR https://github.com/corona-warn-app/cwa-website/pull/1942