Unknown plugin "react-hot-loader/babel"
-
yarn add react-player
-
npm start my project Module build failed: ReferenceError: Unknown plugin "react-hot-loader/babel" specified in "
/node_modules/react-player/package.json" at 0
i'm using webpack 3 and don't have react-hot-loader in my project.
I looked at the package.json for react-player and found the babel config for plugins. i deleted react-hot-loader/babel from the plugins array and it seems to be working as expected.
I installed react-player and had the same problem and can confirm that deleting the plugin requirement works.
This is weird. Why would a project that has ReactPlayer installed be looking at the babel config of ReactPlayer itself and trying to load plugins? The babel config is for compiling the library only, and shouldn't be looked at (or cared about) when using a compiled version of ReactPlayer.
@CookPete Iam also at a loss as to why this is happening.
Do you think it is a misconfigured webpack ?
Are you able to replicate?
I believe this happens when you use babel-loader but do not exlude the node_modules folder as suggested by the babel-loader readme. This will attempt to compile all your imported node modules using babel and in turn, look for the nearest babel config for those files.
If this is not the case, feel free to reopen.
Wow. talk about noob mistake. thanks very much. As a side effect my builds became much much much much faster. was wondering why things were taking forever.
Thank you @CookPete this solved my problem in an unrelated project.