grunt-cloudfront
grunt-cloudfront copied to clipboard
Fatal error: Cannot read property 'length' of null
I'm getting this error:
Fatal error: Cannot read property 'length' of null
Actually it says:
Invalidation succeeded. Please wait a few minutes.OK
{
Location: 'https://cloudfront.amazonaws.com/',
Id: ''
/** normal account data */
}
Fatal error: Cannot read property 'length' of null
I've checked from aws console, it is actually creating invalidation rule, but is not waiting for it to be completed.
Also, this code block:
process.on('SIGINT', function() {
});
prevents grunt watch to be properly terminated by ctrl+C. It says Cannot read property writeln of undefined.
I'm also experiencing the same issue.
I'm seeing this issue as well.
Somehow it makes grunt-watch unable to terminate (As stated above) --this looks like a separate issue.
Note: setting options.listInvalidations: false fixes the issue. Looks like it's having trouble listing the invalidations.
I hit this same issue. The solution was to update package.json dependency for aws-sdk so it could get the latest version. Currently, the dependency is v1.x and aws-sdk is now on v2.x.
I'll submit a PR for this, as I'd prefer to keep using an existing NPM module vs. forking it and publishing a new one for such a minor change.
Thank you @dsquier for the PR. Sorry it took so long for me to merge it, I don't use it anymore at work so hard to find time.
I just merged the fix, and published to npm under version 0.2.2. Hope that fixes it for everyone.