Skip to content

Conversation

@ddfridley
Copy link
Collaborator

I have installed webpack 5 and it builds and runs, but pages don't load. With the change from webpack4 to 5 there have been changes to the way it chunks to javascript files to be served to the browser, and it's the python/django side that's serving them.

I'll keep working on figuring it out on the python side, but it anything jumps out at you let me know.

Here is the error:

The build is okay, but the docker-compose run I get these warnings:

ddfri@ddfri2022dec MINGW64 ~/git/democracy-lab/CivicTechExchange (webpack5#1111)
$ docker-compose up
[+] Building 0.0s (0/0)
[+] Running 4/0
 ✔ Container civictechexchange-db-1            Created                                                                                        0.0s 
 ✔ Container civictechexchange-create_table-1  Created                                                                                        0.0s 
 ✔ Container civictechexchange-web-1           Created                                                                                        0.0s 
 ✔ Container civictechexchange-migrate-1       Created                                                                                        0.0s 
Attaching to civictechexchange-create_table-1, civictechexchange-db-1, civictechexchange-migrate-1, civictechexchange-web-1
civictechexchange-db-1            | 
civictechexchange-db-1            | PostgreSQL Database directory appears to contain a database; Skipping initialization
civictechexchange-db-1            |
civictechexchange-db-1            | 2024-08-09 17:56:08.788 UTC [1] LOG:  starting PostgreSQL 15.3 (Debian 15.3-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
civictechexchange-db-1            | 2024-08-09 17:56:08.789 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
civictechexchange-db-1            | 2024-08-09 17:56:08.789 UTC [1] LOG:  listening on IPv6 address "::", port 5432
civictechexchange-db-1            | 2024-08-09 17:56:08.794 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
civictechexchange-db-1            | 2024-08-09 17:56:08.802 UTC [29] LOG:  database system was interrupted; last known up at 2024-08-08 19:55:14 UTC
civictechexchange-db-1            | 2024-08-09 17:56:09.047 UTC [29] LOG:  database system was not properly shut down; automatic recovery in progress
civictechexchange-db-1            | 2024-08-09 17:56:09.055 UTC [29] LOG:  redo starts at 0/640A0F8
civictechexchange-db-1            | 2024-08-09 17:56:09.055 UTC [29] LOG:  invalid record length at 0/640A1E0: wanted 24, got 0
civictechexchange-db-1            | 2024-08-09 17:56:09.055 UTC [29] LOG:  redo done at 0/640A1A8 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s
civictechexchange-db-1            | 2024-08-09 17:56:09.061 UTC [27] LOG:  checkpoint starting: end-of-recovery immediate wait
civictechexchange-db-1            | 2024-08-09 17:56:09.073 UTC [27] LOG:  checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.003 s, sync=0.002 s, total=0.014 s; sync files=2, longest=0.001 s, average=0.001 s; distance=0 kB, estimate=0 kB
civictechexchange-db-1            | 2024-08-09 17:56:09.076 UTC [1] LOG:  database system is ready to accept connections
civictechexchange-web-1           | 
civictechexchange-web-1           | > [email protected] dev /code
civictechexchange-web-1           | > webpack --config webpack.dev.js && npm run buildtask:collectstatic
civictechexchange-web-1           |
civictechexchange-web-1           | (node:169) [DEP_WEBPACK_MAIN_TEMPLATE_RENDER_MANIFEST] DeprecationWarning: MainTemplate.hooks.renderManifest is deprecated (use Compilation.hooks.renderManifest instead)
civictechexchange-web-1           | (node:169) [DEP_WEBPACK_CHUNK_TEMPLATE_RENDER_MANIFEST] DeprecationWarning: ChunkTemplate.hooks.renderManifest is deprecated (use Compilation.hooks.renderManifest instead)
civictechexchange-web-1           | (node:169) [DEP_WEBPACK_MAIN_TEMPLATE_HASH_FOR_CHUNK] DeprecationWarning: MainTemplate.hooks.hashForChunk is deprecated (use JavascriptModulesPlugin.getCompilationHooks().chunkHash instead)
civictechexchange-web-1           | (node:169) [DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK] DeprecationWarning: Compilation.hooks.normalModuleLoader was moved to NormalModule.getCompilationHooks(compilation).loader
civictechexchange-create_table-1 exited with code 0
civictechexchange-migrate-1       | Operations to perform:
civictechexchange-migrate-1       |   Apply all migrations: account, admin, auth, civictechprojects, common, contenttypes, democracylab, sessions, sites, socialaccount, taggit
civictechexchange-migrate-1       | Running migrations:
civictechexchange-migrate-1       |   No migrations to apply.
civictechexchange-migrate-1       |   Your models in app(s): 'account', 'civictechprojects', 'common', 'democracylab', 'socialaccount' have changes that are not yet reflected in a migration, and so won't be applied.
civictechexchange-migrate-1       |   Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.    
civictechexchange-migrate-1 exited with code 0

@ddfridley ddfridley self-assigned this Aug 9, 2024
@ddfridley ddfridley changed the title builds but doesn't run webpack5#11111 Aug 9, 2024
@ddfridley ddfridley changed the title webpack5#11111 webpack5#1111 Aug 9, 2024
@ddfridley ddfridley linked an issue Aug 9, 2024 that may be closed by this pull request
@ddfridley
Copy link
Collaborator Author

the server runs, but I had to remove acorn from the resolutions in package.json - need to evaluate the impact of that.

@ddfridley ddfridley temporarily deployed to democracy-lab-dev April 17, 2025 02:05 Inactive
@ddfridley ddfridley had a problem deploying to democracy-lab-prod-mirror April 17, 2025 16:14 Failure
@ddfridley ddfridley had a problem deploying to democracy-lab-prod-mirror April 17, 2025 16:27 Failure
@ddfridley ddfridley had a problem deploying to democracy-lab-prod-mirror April 17, 2025 16:45 Failure
@ddfridley ddfridley had a problem deploying to democracy-lab-prod-mirror April 17, 2025 16:46 Failure
@ddfridley ddfridley had a problem deploying to democracy-lab-prod-mirror April 17, 2025 17:05 Failure
@ddfridley ddfridley temporarily deployed to democracy-lab-dev May 29, 2025 17:34 Inactive
@ddfridley ddfridley temporarily deployed to democracy-lab-dev May 29, 2025 17:40 Inactive
@ddfridley ddfridley temporarily deployed to democracy-lab-dev May 29, 2025 17:56 Inactive
@ddfridley ddfridley temporarily deployed to democracy-lab-prod-mirror August 14, 2025 18:01 Inactive
@ddfridley ddfridley temporarily deployed to democracy-lab-dev August 14, 2025 18:05 Inactive
@ddfridley ddfridley temporarily deployed to democracy-lab-dev August 14, 2025 18:10 Inactive
@ddfridley ddfridley temporarily deployed to democracy-lab-dev August 14, 2025 18:18 Inactive
@ddfridley ddfridley temporarily deployed to democracy-lab-dev August 14, 2025 18:34 Inactive
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.

Webpack5 upgrade

2 participants