element-react icon indicating copy to clipboard operation
element-react copied to clipboard

Failed to compile

Open Chidan opened this issue 5 years ago • 4 comments

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 avatar Mar 06 '19 09:03 Chidan

@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

ghost avatar Mar 15 '19 05:03 ghost

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

fodurrr avatar Mar 24 '19 04:03 fodurrr

@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

prakashio avatar May 24 '19 06:05 prakashio

@Prakash106 adding that as dev dependency fixed the issue, thanks!

KandarpAjvalia avatar May 27 '20 20:05 KandarpAjvalia