Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Warning: Cannot read property 'js' of undefined #249

Open
bullgare opened this issue Nov 28, 2013 · 4 comments
Open

Warning: Cannot read property 'js' of undefined #249

bullgare opened this issue Nov 28, 2013 · 4 comments
Labels

Comments

@bullgare
Copy link

I stucked on this warning for a while.
It happens if you set flow option with:

useminPrepare: {
    html: 'built/index.html',
    options: {
        root: '../../app/',
        dest: 'built',
        staging: 'tmp',
        flow: {
            steps: {'js': ['concat', 'uglifyjs']}
        }
    }
}

Fix is simple, just insert 'post' property:

useminPrepare: {
    html: 'built/index.html',
    options: {
        root: '../../app/',
        dest: 'built',
        staging: 'tmp',
        flow: {
            steps: {'js': ['concat', 'uglifyjs']},
            post: []
        }
    }
}

I think usage of steps parameter alone should be mentioned in readme or fixed.

@gudh
Copy link

gudh commented Jan 29, 2014

thanks 👍

It helps a lot

@yfr
Copy link

yfr commented Sep 8, 2014

Had the same issue just now. Would be nice to not have to define a empty post flow.

@calmdev
Copy link

calmdev commented Dec 4, 2014

Thanks, helped me too.

@stephanebachelier
Copy link
Collaborator

@calmdev @yfr which version of usemin are you using ?

stephanebachelier added a commit to stephanebachelier/grunt-usemin that referenced this issue Apr 13, 2015
stephanebachelier added a commit to stephanebachelier/grunt-usemin that referenced this issue Apr 14, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants