Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webpack5#1111 #1112

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
Draft

webpack5#1111 #1112

wants to merge 13 commits into from

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.

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
1 participant