Skip to content

deepmerge needs to be updated to latest version to prevent webpack bug #899

@celicoo

Description

@celicoo

Issue Summary

The current deepmerge version doesn't work with Webpack:

TypeError: merge is not a function
    at Personalization.deepMergeDynamicTemplateData (/opt/sulvo/cloudflare-app/handlers/.webpack/service/webpack:/node_modules/@sendgrid/helpers/classes/personalization.js:289:1)
...

This is a known issue.

Steps to Reproduce

  1. Setup Webpack
  2. Send a transactional email injecting dynamic template data, e.g:
import sgMail from '@sendgrid/mail'

sgMail.setApiKey(process.env.SENDGRID_API_KEY)

sgMail
  .send({
    to: 'me@sendgrid.com',
    from: 'no-reply@sendgrid.com',
    templateId: '...',
    dynamicTemplateData: {
      name: '',
    },
  }).catch(console.error)

Technical details:

  • sendgrid-nodejs version: 6.3.1
  • Node.js version: 10.15.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions