[Console warning after package upgrade: Invalid arguments supplied to oneOf]
carbon-componentscarbon-components-reactI just upgraded the package to it's latest version. Now I get the following console.log error at half of my tests:
Warning: Invalid arguments supplied to oneOf, expected an array, got 4 arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).
I cloned the project to do a global search to find a place using oneOf() without giving an array as argument, but couldn't find anything.
It's not coming from my own code since I don't check props validity using propTypes, I use Typescript interfaces
Any idea what could trigger this warning ? It's kind of spamming my tests and browser console.
If you help me locate the issue, I could even make a pull request to fix it myself 馃槃
I've noticed this too, and it's in the InlineLoading component.
The interesting thing is that the proptype in the src of the code is correct (in this repo) but when the package is downloaded from npm, it's the following:
lib/components/InlineLoading.js
/**
* Specify the loading status
*/
status: _propTypes.default.oneOf('inactive', 'active', 'finished', 'error'),
@metonym when is the npm package going to be updated to reflect these changes?
The problem still exists after a clean install of the package:
(fresh directory)
$ npm i carbon-components-react
$ cat node_modules/carbon-components-react/lib/components/InlineLoading/InlineLoading.js | grep oneOf
status: _propTypes.default.oneOf('inactive', 'active', 'finished', 'error'),
Any updates ? Anyone who knows the answer to @robherley 's message ?
This seems to have been fixed in the 7.7.0 version.
Thank you!
Most helpful comment
@metonym when is the npm package going to be updated to reflect these changes?
The problem still exists after a clean install of the package: