grunt-s3 icon indicating copy to clipboard operation
grunt-s3 copied to clipboard

getConfig() is not defined

Open NickHeiner opened this issue 11 years ago • 5 comments

I'm trying to use the delete functionality:

        s3: {
            options: {
                key: process.env.AWS_KEY,
                secret: process.env.AWS_SECRET,
                access: 'public-read'
            },

            clean: {
                options: {
                    del: [{
                        src: '**/*.*'
                    }]
                }
            }
        },

I get the following error:

$ grunt s3:clean --stack
Running "s3:clean" (s3) task
Warning: getConfig is not defined Use --force to continue.
ReferenceError: getConfig is not defined
    at Object.exports.del (/Users/nick.heiner/opower/x-web-deploy/node_modules/grunt-s3/tasks/lib/s3.js:342:38)
    at /Users/nick.heiner/opower/x-web-deploy/node_modules/grunt-s3/tasks/lib/S3Task.js:53:22
    at /Users/nick.heiner/opower/x-web-deploy/node_modules/grunt/node_modules/async/lib/async.js:86:13
    at Array.forEach (native)
    at _forEach (/Users/nick.heiner/opower/x-web-deploy/node_modules/grunt/node_modules/async/lib/async.js:26:24)
    at Object.async.forEach (/Users/nick.heiner/opower/x-web-deploy/node_modules/grunt/node_modules/async/lib/async.js:85:9)
    at Object.S3Task.run (/Users/nick.heiner/opower/x-web-deploy/node_modules/grunt-s3/tasks/lib/S3Task.js:52:5)
    at Object.<anonymous> (/Users/nick.heiner/opower/x-web-deploy/node_modules/grunt-s3/tasks/s3.js:37:10)
    at Object.<anonymous> (/Users/nick.heiner/opower/x-web-deploy/node_modules/grunt/lib/grunt/task.js:258:15)
    at Object.thisTask.fn (/Users/nick.heiner/opower/x-web-deploy/node_modules/grunt/lib/grunt/task.js:78:16)

Aborted due to warnings.

Am I doing something wrong?

NickHeiner avatar May 31 '13 17:05 NickHeiner

I believe what you want is:

        s3: {
            options: {
                key: process.env.AWS_KEY,
                secret: process.env.AWS_SECRET,
                access: 'public-read'
            },

            clean: {
                del: [{
                    src: '**/*.*'
                }]
            }
        },

pifantastic avatar May 31 '13 17:05 pifantastic

That fails with the same error.

NickHeiner avatar May 31 '13 20:05 NickHeiner

Which version of grunt-s3 are you using?

pifantastic avatar May 31 '13 21:05 pifantastic

:+1:

soncodi avatar Jun 02 '13 21:06 soncodi

Yep, good catch. This broke when we upgraded grunt-s3 to a multi-task. I'm pushing a fix tonight.

pifantastic avatar Jun 04 '13 04:06 pifantastic