element-react
element-react copied to clipboard
Failed to compile
Description
I am using version "element-react": "^1.4.33 As soon as Import any comoponent from element-react, I get the below error:
Failed to compile.
./node_modules/element-react/dist/npm/es5/libs/animate/index.js
Module not found: Can't resolve 'react-hot-loader' in 'C:\Chidu\Projects\amplifyagora\node_modules\element-react\dist\npm\es5\libs\animate'
Below is my simple code:
import React from "react";
import { Menu as Nav, Icon, Button } from "element-react";
const Navbar = () => <div>Navbar</div>;
export default Navbar;
@Chidan I'm getting the same issue. I'm assuming you're doing the Reed Barger course? I downgraded to version 1.4.25 and it worked
I had the same problem, downgrading as @edward-hong proposed solved the issue but would be nice if the latest element-react works with create-react-app as well. Can somebody solve this? Thanks
@Chidan I'm also getting the same error when compiling and it's related to the react-hot-loader module.
Use this -
npm i -D react-hot-loader@next
@Prakash106 adding that as dev dependency fixed the issue, thanks!