Closed MrToph closed 5 years ago
I'm seeing the same error today after upgrading the Create React App react-scripts from 3.0.0 to 3.0.1. The error did not exist in react-scripts 3.0.0. Rolling back to 3.0.0 seems to be working so far
Mine doesn't work even after rolling back to 3.0.0.
Same problem here.
Same here
Changing the import to an ES5 import using require
fixes it but i can't rely on patching my dependencies. There's an issue over at babel-plugin-react-intl
but i think the issue lies in this package.
I was able to temporarily get around this by using a yarn resolution block like this:
"resolutions": {
"react-intl.macro/babel-plugin-react-intl": "3.0.1"
},
Same problem here:
node_modules/babel-plugin-react-intl/lib/print-icu-message.js:6
import parser from 'intl-messageformat-parser';
^^^^^^
SyntaxError: Unexpected identifier
Any updates?
I'm not using yarn, so the resolution block is not an option to me. I know there are solutions like that for NPM, but I would prefer not to mess around to fix something that should be handled by the dependency itself.
The import issue should be fixed by https://github.com/evenchange4/react-intl.macro/commit/a7fa61192ef75bdfc61fc9db6a880329be7dc2e0 . Please try version v0.3.7
.
This solved the issue for me, thanks! @evenchange4
I'm using create-react-app with typescript and react-intl.
When running the build / extract script with imports from
react-intl
everything works fine. As soon as I change it toreact-intl.macro
the scripts fail: