SyntaxError: Unexpected token
pepf opened this issue · 5 comments
pepf commented
Hey,
Like the idea, love to give it a try!
Setup:
macOS 10.13.6
node: v10.15.2
yarn: 1.15.2
npm: 6.4.1
babel deps are fixed within the package so shouldn't matter, correct?
I gave it a try using npm/yarn, both gave me the same output:
/usr/local/lib/node_modules/i18nize-react/node_modules/babylon/lib/index.js:4457
throw err;
^
SyntaxError: Unexpected token (49:2)
at Parser.pp$5.raise (/usr/local/lib/node_modules/i18nize-react/node_modules/babylon/lib/index.js:4454:13)
at Parser.pp.unexpected (/usr/local/lib/node_modules/i18nize-react/node_modules/babylon/lib/index.js:1761:8)
at Parser.pp$3.parseIdentifier (/usr/local/lib/node_modules/i18nize-react/node_modules/babylon/lib/index.js:4332:10)
at Parser.pp$3.parsePropertyName (/usr/local/lib/node_modules/i18nize-react/node_modules/babylon/lib/index.js:4156:96)
at Parser.pp$3.parseObj (/usr/local/lib/node_modules/i18nize-react/node_modules/babylon/lib/index.js:4045:12)
at Parser.pp$3.parseExprAtom (/usr/local/lib/node_modules/i18nize-react/node_modules/babylon/lib/index.js:3719:19)
at Parser.parseExprAtom (/usr/local/lib/node_modules/i18nize-react/node_modules/babylon/lib/index.js:7238:22)
at Parser.pp$3.parseExprSubscripts (/usr/local/lib/node_modules/i18nize-react/node_modules/babylon/lib/index.js:3494:19)
at Parser.pp$3.parseMaybeUnary (/usr/local/lib/node_modules/i18nize-react/node_modules/babylon/lib/index.js:3474:19)
at Parser.pp$3.parseExprOps (/usr/local/lib/node_modules/i18nize-react/node_modules/babylon/lib/index.js:3404:19)
I tried on two branches of a react-native repo
- One with a partial implementation of 18next already there.
- One "clean" master with no 18next setup whatsoever.
Ghost---Shadow commented
If possible can you produce a small piece of code which reproduces the issue?
Ghost---Shadow commented
Were you using experimental class properties like this
static propTypes = {
label: PropTypes.string.isRequired,
handleCheckboxChange: PropTypes.func.isRequired
};
Ghost---Shadow commented
I made a bunch of changes which makes no files in react shopping cart example break catastrophically. v0.2.0
released.
See, if that fixes your problem.
pepf commented
Thanks that works!
Ghost---Shadow commented
Relevant Stack overflow post. Also, closing thread.