Cannot read properties of undefined
Unanswered
Wood Duck posted this in #help-forum
Wood DuckOP
Hi, I have a problem with this component, basically it is a modal that I import in the header.tsx, this modal contains a search and every time the page reloads I get this error:
I'm using the chakraui library, I don't know what could be causing this error. I tried to do it without chakra but it returned the same error.
Cannot read properties of undefined (reading 'ModalSearch')I'm using the chakraui library, I don't know what could be causing this error. I tried to do it without chakra but it returned the same error.
6 Replies
Wood DuckOP
Most probably the ModalSearch is not importing properly.
Or is not present in the package.
@Param san Most probably the ModalSearch is not importing properly.
Wood DuckOP
I'm exporting my components like this
/components/index.ts
/components/index.ts
...
export * from './modal-search/modal-search';And I'm using like this:
import { Icon, ModalSearch } from '@/components';