Skip to content

Can't get sequelize.js to work with serverless-bundle. #45

@ggrantrowberry

Description

@ggrantrowberry

I am using a lambda function to parse a file uploaded to s3 then take the data and put it in a remote mysql database. I am using sequelize.js with the mysql2 package. I've deployed my code but I get the this error, {"errorType":"Error","errorMessage":"Please install mysql2 package manually"}. I googled around and found that using serverless-webpack I just need to use the following.

custom:
  webpack:
    includeModules:
      forceInclude:
        - mysql
        - mysql2

https://stackoverflow.com/questions/48554917/getting-sequelize-js-library-to-work-on-amazon-lambda
I tried that but it obviously didn't work with serverless-bundle. I saw a previous issue about using knex.js that looked like a similar problem. I tried installing the serverless-bundle@beta as was suggested but it didn't install properly.

I'm brand new to serverless and I'm not sure what else to do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions