Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: JSON.parse(...).map is not a function #162

Open
nils-hoyer opened this issue Dec 12, 2018 · 1 comment
Open

TypeError: JSON.parse(...).map is not a function #162

nils-hoyer opened this issue Dec 12, 2018 · 1 comment

Comments

@nils-hoyer
Copy link

yarn add react-intl-po

yarn rip json2pot 'src/translations/i18next.json' \ -o ./master.pot

i18next.json
{ "a": "b", "c": "d" }
readAllMessageAsObjectSync() is returning map is not a function on valid srcPatterns

When debugged I saw JSON.parse(_fs2.default.readFileSync(filename, 'utf8') is returning valid JSON Object. How can you use map on Object in line 41?

side note: I get the same result with node_modules/.bin/react-intl-po ...

@samkelleher
Copy link

It seems an issue with Ramda and I was able to workaround by providing a full path rather than relative.

react-intl-po json2pot '~/Repositories/Project/src/messages/*.json' -o master.pot

That program exits normally, that said, the resulting pot file is empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants