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

Getting Error When Using with Typescript #20

Open
rjbullock opened this issue Oct 31, 2022 · 2 comments
Open

Getting Error When Using with Typescript #20

rjbullock opened this issue Oct 31, 2022 · 2 comments

Comments

@rjbullock
Copy link

rjbullock commented Oct 31, 2022

I believe I have everything installed and configured correctly.

STATICFILES_FINDERS = [ "django.contrib.staticfiles.finders.FileSystemFinder", "django.contrib.staticfiles.finders.AppDirectoriesFinder", "compressor.finders.CompressorFinder", ]

COMPRESS_ENABLED = True

COMPRESS_REBUILD_TIMEOUT = 2592000  # (30 days in seconds)
COMPRESS_OFFLINE = False

COMPRESS_OFFLINE_TIMEOUT = 31536000  # (1 year in seconds)
COMPRESS_OUTPUT_DIR = 'dev'

And in my template:

{% block extra_js %}
    <script type="text/javascript" src="{% static 'bundle.js' %}"></script>
    {% compress parcel file myts %}
        <script src="{% static 'test.ts' %}"></script>
   {% endcompress %}
 {% endblock %}

However, when I hit the page I get the following error:

TypeError at /todo/
Signal.__init__() got an unexpected keyword argument 'providing_args'

Any idea what could be wrong?

@rjbullock
Copy link
Author

I got around this error by editing signals.py to this:

import django.dispatch
post_compress = django.dispatch.Signal()

It now works for regular JS but for TS, modules don't seem to load.

@eadwinCode
Copy link
Owner

@rjbullock Thanks for updating this. And I am very sorry for not replying when needed.

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

No branches or pull requests

2 participants