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

Failed to compile. Module not found: Error: Can't resolve 'redux-form'

Open Dr8g0n opened this issue 9 years ago • 3 comments

After upgrading admin-on rest from 1.23 to 1.3.0, I got the error below everytime I run "npm run build"

Creating an optimized production build... Failed to compile. Module not found: Error: Can't resolve 'redux-form' in '/Codes/access-ui/src'

Dr8g0n avatar Sep 19 '17 18:09 Dr8g0n

Cant reproduce on the aor example and demo. This is likely a problem with your code. Did you use redux-form in your code? In this case, it should be declared in your project dependencies.

To get help about your code using aor, please head to StackOverflow.

fzaninotto avatar Sep 20 '17 12:09 fzaninotto

I have import { Field } from 'redux-form';, as documented at https://marmelab.com/admin-on-rest/Inputs.html#writing-your-own-input-component

Dr8g0n avatar Sep 25 '17 22:09 Dr8g0n

Yep, in this case, you must install redux-form with

npm install redux-form -S

fzaninotto avatar Sep 26 '17 07:09 fzaninotto