Django pipeline generates empty files

Issue

I’ve got several apps in my django project and I’m using pipeline to compress files and all works fine, but I have an app called “mypage” for which every file generated after calling collectstatic is empty! (if I copy a file from mypage/static into another app static folder it’s properly generated!)
I’m going crazy! How can I debug this behavior? (no error or warning is displayed in the console and the pipeline configuration is properly defined because other static files are properly generated) Is perhaps “mypage” a somehow reserved word? 0_o

this is my configuration:

STATIC_URL = '/static/'
STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    'pipeline.finders.PipelineFinder',
    'pipeline.finders.CachedFileFinder',
)
STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'
PIPELINE_DISABLE_WRAPPER = True
PIPELINE_ENABLED = True
PIPELINE_JS = {
    'foo': {
        'source_filenames': (
            'mypage/js/controllers/MyController.js',
        ),
        'output_filename': 'mypage/js/foo.js'
    },
}

…the generated “foo.js” is an empty file, if I move “MyController.js” to another app, let’s say “fooapp”, then fooapp/js/foo.js will contains the expected JavaScript 🙁

Solution

Check for the file path to be mypage/static/mypage/js/controllers/MyController.js.

Answered By – Tim Edgar

Answer Checked By – Jay B. (AngularFixing Admin)

Leave a Reply

Your email address will not be published.