Yes
Yes. Additionally, I made a clean installation on another machine.
'Updating to New Releases'
Environment:
OS: macOS 10.14
Node: 8.11.3
Yarn: Not Found
npm: 5.6.0
Watchman: Not Found
Xcode: Xcode 10.0 Build version 10A255
Android Studio: Not Found
Packages: (wanted => installed)
react: ^16.5.2 => 16.5.2
react-dom: ^16.5.2 => 16.5.2
react-scripts: ^2.0.4 => 2.0.4
npm run build
successful build

'Component' is a functional component.

Can you please provide reproducible demo? Thanks
Probably a bug in the prop-types transform.
@stereobooster I'm not sure that I can reproduce the error ... This happens only when you run the command npm run build
@gaearon The error appears only when determining the prop-type as follows
[SOME_CONSTANT] : PropTypes.arrayOf(...) or PropTypes.oneOfType(...).
Determining a key without a constant and [] leads to a successful build
someKey : PropTypes.arrayOf(...) or PropTypes.oneOfType(...)
/cc @oliviertassinari
@av-dev If you could provide a full reproducing example on https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types side, it would be awesome :).
@oliviertassinari Hi! Download bug example and run npm i && npm run babel
TypeError: Cannot read property 'type' of undefined
at memberExpressionRootIdentifier (D:\Example\node_modules\babel-plugin-transform-react-remove-prop-types\lib\index.js:105:39)
105 line in code while (memberExpression.node.object.type === 'MemberExpression') {
@av-dev Great, thank you!
It should be fixed with v0.4.20, thank you @lukeapage!
@Timer I believe this can now be closed thanks to https://github.com/facebook/create-react-app/commit/5c3f333837e4a296b1d6c7c9844cbb73516d3255 (was this commit pushed without a PR?) which uses [email protected].
Most helpful comment
It should be fixed with v0.4.20, thank you @lukeapage!