Module build failed: Error: Plugin 0 specified in "C:\\cp\\notes-app-api\\.babelrc" p rovided an invalid property of "wrapCallSite"

Hi, I tried running:

serverless invoke local --function create --path mocks/create-event.json

The error console info is below. Anyone know how to fix this?

Also, I entered the debug parameter. Where is the log file?

Serverless: Bundling with Webpack…
Time: 7769ms
Built at: 2018-04-27 08:41:58
Asset Size Chunks Chunk Names
create.js 4.55 KiB create [emitted] create
create.js.map 2.71 KiB create [emitted] create
Entrypoint create = create.js create.js.map
[./create.js] 1.5 KiB {create} [built] [failed] [1 error]

ERROR in ./create.js
Module build failed: Error: Plugin 0 specified in “C:\cp\notes-app-api\.babelrc” p
rovided an invalid property of “wrapCallSite”
at Plugin.init (C:\cp\notes-app-api\node_modules\babel-core\lib\transformation\pl
ugin.js:131:13)
at Function.normalisePlugin (C:\cp\notes-app-api\node_modules\babel-core\lib\tran
sformation\file\options\option-manager.js:152:12)
at C:\cp\notes-app-api\node_modules\babel-core\lib\transformation\file\options\op
tion-manager.js:184:30
at Array.map ()
at Function.normalisePlugins (C:\cp\notes-app-api\node_modules\babel-core\lib\tra
nsformation\file\options\option-manager.js:158:20)
at OptionManager.mergeOptions (C:\cp\notes-app-api\node_modules\babel-core\lib\tr
ansformation\file\options\option-manager.js:234:36)
at OptionManager.init (C:\cp\notes-app-api\node_modules\babel-core\lib\transforma
tion\file\options\option-manager.js:368:12)
at File.initOptions (C:\cp\notes-app-api\node_modules\babel-core\lib\transformati
on\file\index.js:212:65)
at new File (C:\cp\notes-app-api\node_modules\babel-core\lib\transformation\file
index.js:135:24)
at Pipeline.transform (C:\cp\notes-app-api\node_modules\babel-core\lib\transforma
tion\pipeline.js:46:16)
at transpile (C:\cp\notes-app-api\node_modules\babel-loader\lib\index.js:50:20)
at Object.module.exports (C:\cp\notes-app-api\node_modules\babel-loader\lib\index
.js:173:20)

Error --------------------------------------------------

Webpack compilation error, see above

 For debugging logs, run again after setting the "SLS_DEBUG=*" environment variab

le.

Get Support --------------------------------------------

Your Environment Information -----------------------------
OS: win32
Node Version: 8.10.0
Serverless Version: 1.26.1

Owner@Owner MINGW64 /c/cp/notes-app-api
$ SLS_DEBUG=*

Here is my create.js code:

import uuid from “uuid”;
import AWS from “aws-sdk”;

AWS.config.update({ region: "us-west-2" });
const dynamoDb = new AWS.DynamoDB.DocumentClient();

export function main(event, context, callback) {
    // Request body is passed in as a JSON encoded string in 'event.body'
    const data = JSON.parse(event.body);
    
    const params = {
        TableName: "notes",
        // 'Item' contains the attributes of the item to be created
        // - 'userId': user identities are federated through the
        //             Cognito Identity Pool, we will use the identity id
        //             as the user id of the authenticated user
        // - 'noteId': a unique uuid
        // - 'content': parsed from request body
        // - 'attachment': parsed from request body
        // - 'createdAt': current Unix timestamp
        Item: {
            userId: event.requestContext.identity.cognitoIdentityId,
            notesId: uuid.v1(),
            content: data.content,
            attachment: data.attachment,
            createdAt: Date.now()
        }
    };
    
    dynamoDb.put(params, (error, data) => {
        // Set response headers to enable CORS (Cross-Origin Resource Sharing)
        const headers = {
            "Access-Control-Allow-Origin": "*",
            "Access-Control-Allow-Credentials": true
        };
        
        // Return status code 500 on error
        if (error) {
            const response = {
                statusCode: 500,
                headers: headers,
                body: JSON.stringify({ status: false })
            };
            callback(null, response);
            return;
        }
        
        // Return status code 200 and the newly created item
        const response = {
            statusCode: 200,
            headers: headers,
            body: JSON.stringify(params.Item)
        };
        callback(null, response);
    });
}

FYI - I needed to install babel-plugin-source-map-support to fix this. Show me your package.json, .babelrc and webpack config to debug further if that doesn’t help