Reputation: 53
I am receiving the following error : Attempted import error: 'MyPropertiesForm' is not exported from '../../forms'.
and I cannot figure out why because everything is correct.
Here is how I import import { MyPropertiesForm } from '../../forms';
// this file is in E:\falala\src\containers\MyPropertiesPage\MyPropertiesPage.js
And here is how I export
const MyPropertiesForm = compose(injectIntl)(MyPropertiesFormComponent);
MyPropertiesForm.displayName = 'ContactDetailsForm';
export default MyPropertiesForm;
//this file is in E:\falala\src\forms\MyPropertiesForm\MyPropertiesForm.js
Upvotes: 0
Views: 4040
Reputation: 743
Try
import MyPropertiesForm from '../../forms/MyPropertiesForm/MyPropertiesForm';
Pay attention that the path you gave was only to the "form" folder but the export was actually in a file deep inside that folder.
And also pay attention that when you import a default exported module so you don't write it inside {} but write it as is named.
Upvotes: 1