Closed
Milestone
Description
Is this a bug report?
Yes
Did you try recovering your dependencies?
Yes. Additionally, I made a clean installation on another machine.
Which terms did you search for in User Guide?
'Updating to New Releases'
Environment
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
Steps to Reproduce
npm run build
Expected Behavior
successful build


Activity
stereobooster commentedon Oct 5, 2018
Can you please provide reproducible demo? Thanks
gaearon commentedon Oct 5, 2018
Probably a bug in the
prop-typestransform.multum commentedon Oct 5, 2018
@stereobooster I'm not sure that I can reproduce the error ... This happens only when you run the command
npm run buildmultum commentedon Oct 5, 2018
@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(...)Timer commentedon Oct 8, 2018
/cc @oliviertassinari
oliviertassinari commentedon Oct 13, 2018
@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 :).
multum commentedon Oct 16, 2018
@oliviertassinari Hi! Download bug example and run
npm i && npm run babelTypeError: 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') {oliviertassinari commentedon Oct 16, 2018
@AV-Dev Great, thank you!
oliviertassinari commentedon Nov 6, 2018
It should be fixed with v0.4.20, thank you @lukeapage!
NMinhNguyen commentedon Jan 12, 2019
@Timer I believe this can now be closed thanks to 5c3f333 (was this commit pushed without a PR?) which uses
babel-plugin-transform-react-remove-prop-types@0.4.20.