malj / django-parcel-ssr

Django server side rendering, powered by Parcel bundler
31 stars 7 forks source link

project still maintained? #6

Open nerdoc opened 3 years ago

nerdoc commented 3 years ago

Just wanted to know if this project is still maintained. The default (React) version does not run, when calling ./manage.py runserver, it outputs

/home/christian/tmp/dpr/node_modules/babel-runtime/core-js/object/get-own-property-symbols.js:1
/home/christian/tmp/dpr/node_modules/babel-runtime/core-js/object/get-own-property-symbols.js:1
Error: Cannot find module 'core-js/library/fn/object/get-own-property-symbols'
Error: Cannot find module 'core-js/library/fn/object/get-own-property-symbols'
Require stack:
Require stack:
- /home/christian/tmp/dpr/node_modules/babel-runtime/core-js/object/get-own-property-symbols.js
- /home/christian/tmp/dpr/node_modules/babel-runtime/core-js/object/get-own-property-symbols.js
- /home/christian/tmp/dpr/node_modules/babel-types/lib/index.js
- /home/christian/tmp/dpr/node_modules/babel-types/lib/index.js
- /home/christian/tmp/dpr/node_modules/parcel-bundler/src/Asset.js
- /home/christian/tmp/dpr/node_modules/parcel-bundler/src/Asset.js
- /home/christian/tmp/dpr/node_modules/parcel-bundler/src/assets/RawAsset.js
- /home/christian/tmp/dpr/node_modules/parcel-bundler/src/assets/RawAsset.js
- /home/christian/tmp/dpr/node_modules/parcel-bundler/src/Parser.js
- /home/christian/tmp/dpr/node_modules/parcel-bundler/src/Parser.js
- /home/christian/tmp/dpr/node_modules/parcel-bundler/src/Bundler.js
- /home/christian/tmp/dpr/node_modules/parcel-bundler/src/Bundler.js
- /home/christian/tmp/dpr/node_modules/parcel-bundler/index.js
- /home/christian/tmp/dpr/node_modules/parcel-bundler/index.js
at Object.<anonymous> (/home/christian/tmp/dpr/node_modules/babel-runtime/core-js/object/get-own-property-symbols.js:1)
at Object.<anonymous> (/home/christian/tmp/dpr/node_modules/babel-runtime/core-js/object/get-own-property-symbols.js:1)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1131:10) {
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1131:10) {
code: 'MODULE_NOT_FOUND',
code: 'MODULE_NOT_FOUND',

And the Vuejs version errors:

django.template.exceptions.TemplateSyntaxError: Error: Secure random number generation is not supported by this browser.
Use Chrome, Firefox or Internet Explorer 11

I use Firefox 84. So Secure random number generation should be no problem here. Seems to be a ug in one of the old dependencies.

Is there an update in sight? Any chance to support Parcel2, or Vue3?

This would be such a great project... Thanks.

malj commented 3 years ago

Hi @nerdoc, thanks for the report.

The lib isn't actively maintained because I haven't used Parcel in my projects in a while. It seems that both Parcel and Django APIs have had some breaking changes in the meantime. I'll take a look when I get the chance.

The error you're getting is not browser related, but rather NodeJS related because Parcel has to produce two bundles in order for SSR to work: one for the server, the other for browsers. Hence the two separate entry points:server.js and client.js.

For the next update I'll aim to expose most of Parcel config in Django settings, because the idea of the project is to be as thin layer as possible for Django-Parcel integration, and just provide automatic NodeJS render server management.