lingui-cli extract
See original GitHub issueHi, I have upgraded the package since last time, here is my config:
├─┬ babel-preset-lingui-react@1.0.1
│ ├── babel-plugin-lingui-transform-js@1.0.1
│ └── babel-plugin-lingui-transform-react@1.0.1
├─┬ lingui-cli@1.0.4
│ ├── babel-plugin-lingui-extract-messages@1.0.2
├─┬ lingui-conf@0.8.1
├─┬ lingui-i18n@1.0.1
│ └── lingui-formats@1.0.1
├── lingui-react@1.0.1
But I encounter a problem when I do lingui extract
, Unexpected token
.
The code is fine and works when I yarn build
it or yarn start
it
yarn lingui v0.27.5
$ "/home/lfdmr/Dev/test/web_frontend/node_modules/.bin/lingui" "extract"
/home/lfdmr/Dev/test/web_frontend/node_modules/lingui-cli/node_modules/babel-core/lib/transformation/file/index.js:590
throw err;
^
SyntaxError: /home/lfdmr/Dev/test/web_frontend/src/App1/components/App.js: Unexpected token (6:2)
4 |
5 | const App = () => (
> 6 | <h1><Trans>Welcome App 1!</Trans></h1>
| ^
7 | )
8 |
9 | export default App
at Parser.pp$5.raise (/home/lfdmr/Dev/test/web_frontend/node_modules/lingui-cli/node_modules/babylon/lib/index.js:4454:13)
at Parser.pp.unexpected (/home/lfdmr/Dev/test/web_frontend/node_modules/lingui-cli/node_modules/babylon/lib/index.js:1761:8)
at Parser.pp$3.parseExprAtom (/home/lfdmr/Dev/test/web_frontend/node_modules/lingui-cli/node_modules/babylon/lib/index.js:3750:12)
at Parser.pp$3.parseExprSubscripts (/home/lfdmr/Dev/test/web_frontend/node_modules/lingui-cli/node_modules/babylon/lib/index.js:3494:19)
at Parser.pp$3.parseMaybeUnary (/home/lfdmr/Dev/test/web_frontend/node_modules/lingui-cli/node_modules/babylon/lib/index.js:3474:19)
at Parser.pp$3.parseExprOps (/home/lfdmr/Dev/test/web_frontend/node_modules/lingui-cli/node_modules/babylon/lib/index.js:3404:19)
at Parser.pp$3.parseMaybeConditional (/home/lfdmr/Dev/test/web_frontend/node_modules/lingui-cli/node_modules/babylon/lib/index.js:3381:19)
at Parser.pp$3.parseMaybeAssign (/home/lfdmr/Dev/test/web_frontend/node_modules/lingui-cli/node_modules/babylon/lib/index.js:3344:19)
at Parser.pp$3.parseParenAndDistinguishExpression (/home/lfdmr/Dev/test/web_frontend/node_modules/lingui-cli/node_modules/babylon/lib/index.js:3828:26)
at Parser.pp$3.parseExprAtom (/home/lfdmr/Dev/test/web_frontend/node_modules/lingui-cli/node_modules/babylon/lib/index.js:3709:19)
error Command failed with exit code 1.
Thanks
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
API Reference - CLI (@lingui/cli) — LinguiJS documentation
@lingui/cli manages locales, extracts messages from source files into message catalogs and compiles message catalogs for production use.
Read more >CLI/Watch - Extract with [files] marks other strings as obsolete ...
CLI - Whenever I pass a [files] string into the cmd it is not recognized and command is extracting from all source path...
Read more >@lingui/cli - npm
CLI for working wit message catalogs. Latest version: 3.15.0, last published: a month ago. Start using @lingui/cli in your project by ...
Read more >@lingui/cli NPM | npm.io
You can run the scripts directly using a tool for executing Node packages NPX . NPX is included in NPM version 5.2 and...
Read more >@lingui/conf | Yarn - Package Manager
Features · accept t as function (c0c08ba) · add cli option to extract only a specific locale (#816 (49f45b2) · enable pseudolocalization from...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had same error but caused by the different issue.
react-scripts
were missing in dependencies. https://github.com/lingui/js-lingui/issues/434Added section about integrations to docs https://lingui.gitbooks.io/js/guides/integrations.html