Skip to content
This repository was archived by the owner on Jun 8, 2019. It is now read-only.
This repository was archived by the owner on Jun 8, 2019. It is now read-only.

The parseError thrown by printICUMessage is not captured properly by babel #64

@kumarharsh

Description

@kumarharsh

When I define my messages with some invalid message syntax which can't be properly parsed by PrintICUMessage, then a parseError is thrown, and then re-thrown here:

This gets swallowed by babel, and a very different error is thrown, making it hard to understand what is going on...

Module build failed: TypeError: C:/Workspace/src/app/messages.js: Error is not a function
    at File.buildCodeFrameError (C:\Workspace\node_modules\babel-core\lib\transformation\file\index.js:407:15)
    at NodePath.buildCodeFrameError (C:\Workspace\node_modules\babel-traverse\lib\path\index.js:143:26)
    at C:\Workspace\node_modules\babel-preset-playlyfe\lib\plugins\react-intl.js:75:37

Apparently removing the second parameter from this line fixes this problem.

PS: I'm using this plugin within my webpack build.

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