Skip to content

[WIP] Cannot read property 'MessageState' of undefined #242

@AlecRobertson

Description

@AlecRobertson

I am using node-mailjet within a node project that is the basis of an AWS lambda.

I am importing the Message namespace from the node-mailjet package as follows:

import { Message } from 'node-mailjet'

When the application runs (transpiled using Webpack), Message is undefined and so when I refer to the MessageState enum on this namespace, the application fails. I require the MessageState enum so I can do error handling and logging.

This appears to be an issue with how node-mailjet is processing its namespaces, with the transpiled code not including this namespace or any of its exports and so they come back as undefined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions