Js-lingui: Extract fails when files do not have import from 'lingui-react'

Created on 17 Aug 2017  路  6Comments  路  Source: lingui/js-lingui

Hi, i'm setting up lingui on my project, but i wont need i18n for all files, but i get the following errors when using extract on the project:
image

Individual files that import {Trans} work fine. Is there any way to just ignore files without import and keep extracting others?

Thanks.

馃悶bug 馃摝 cli 馃摝 plugin-extract

Most helpful comment

Any simple file can cause this, for example:

import React from 'react'

class LinguiErrorTest extends React.Component {
  render() {
    return <div>:(</div>
  }
}

Using extract gives me:
image

The same error will happen on the babel plugin for some files (i'm not sure what is the trigger for the babel plugin).

All 6 comments

This shouldn't been happening after latest release of CLI ([email protected]) and extract plugin ([email protected]). I'll take a look

You can also ignore individual files or patterns with srcPathIgnorePatterns option as a temporary fix (see https://lingui.gitbooks.io/js/ref/cli.html#srcpathignorepatterns-array).

Using latest release ([email protected]) and extract plugin ([email protected]).

Issue still persists.

I'm not able to reproduce this bug.

It's the very same error? Could you please paste the file which causes this error?

Any simple file can cause this, for example:

import React from 'react'

class LinguiErrorTest extends React.Component {
  render() {
    return <div>:(</div>
  }
}

Using extract gives me:
image

The same error will happen on the babel plugin for some files (i'm not sure what is the trigger for the babel plugin).

Working now, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

landsman picture landsman  路  4Comments

landsman picture landsman  路  5Comments

ppozniak picture ppozniak  路  4Comments

LFDMR picture LFDMR  路  4Comments

ImADrafter picture ImADrafter  路  4Comments