Topic: React MDB5 6.0.0 Typescript installation not working
snh5499 priority asked 1 year ago
Your instructions are really bad or not updated for the latest version you have out there. I am using typescript and having problems with the types. Not sure why you cannot deploy the typescript types @types/node, so when paying customers install your component it installs all the dependencies and we can just focus on using the component. I have to be troubleshooting this for couple of days now and still not able to focus on the solution I am building. About to give up and request a refund. Delivering a solution includes doing it right and not just delivering code. Now that I got that off my chest this is my current situation.
I paid for pro: I created in my app's root folder the typings/mdb-react-ui-kit/index.d.ts file and copied the imports ONLY (as you have in your documentation) from node_modules/mdb-react-ui-kit/dist/types/index.d.ts. You did not have the types directory in your docs, but assuming that's the target directory that I should have used. In the response above you included the 2 exports at the bottom, but you documentation said not to. Regardless, it did not solve my problem either way, so assume it does not matter.
I added the "typeRoots": ["./node_modules/@types", "./typings/@types"] to the compileroptions section of tconfig.json file in my app's root. So expecting this should be acceptable to make all the typescripts types findable.
Nope, having an issue with my app component Sidenav.tsx that isolates features for providing a sidenav for my app. When I import components from mdb-react-ui-kit I get the error that it could not find the declaration module for mdb-react-ui-kit and won't compile.
This is the declaration in my Sidenav function :
import { MDBSideNav, MDBSideNavMenu, MDBSideNavItem, MDBSideNavLink, MDBSideNavCollapse, MDBBtn, MDBIcon, } from "mdb-react-ui-kit";
please help with any suggestions????
Closed
This topic is closed.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Closed
- ForumUser: Priority
- Premium support: Yes
- Technology: MDB React
- MDB Version: MDB5 6.0.0
- Device: PC
- Browser: Chrome
- OS: Windows 11
- Provided sample code: No
- Provided link: No
chalicham priority commented 1 year ago
I have same problem , i could not get to work with the instruction given
Grzegorz Bujański staff commented 1 year ago
A solution to this problem has already been presented here: https://mdbootstrap.com/support/react/typescript-implementation/, so I'm closing this thread. If the problem persists, let me know in the thread linked above.