You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set up for frontend and backend has been done in this PR. While setting up the front end, I faced the following issues:
Running ChakraCLI was giving an error related to fontsource.
Typescript
ChakraCLI and fontsource
When generating theme types using the ChakraCLI else it gives the following error:
Chakra UI CLI v2.4.1 by Chakra UI
Generate theme typings for autocomplete
✘ [ERROR] No loader is configured for".woff2" files: node_modules/.pnpm/@[email protected]/node_modules/@fontsource-variable/nunito/files/nunito-latin-wght-normal.woff2
node_modules/.pnpm/@[email protected]/node_modules/@fontsource-variable/nunito/index.css:47:7:
47 │ src: url(./files/nunito-latin-wght-normal.woff2) format('woff2-variations');
I've tried using unplugin-fonts/vite but it didn't work. Also, to make ChakraCLI work with ppm I had to install @chakra-ui/styled-system as a dev dependency. chakra-ui/chakra-ui#5919
All of this is done to use ChakraCLI for custom types in colors, ... but it isn't as beneficial as to go and look for the above issues.
Typescript
In some places, Typescript was giving errors. This happened for Redux Toolkit and React Router.
The following issues provide more context on the issue faced:
// Here this issue is faced by `useAppDispatch`// eslint-disable-next-line @typescript-eslint/no-unused-varsimporttype*as_Reduxfrom"@reduxjs/toolkit";exportconstuseAppSelector: TypedUseSelectorHook<RootState>=useSelector;exportconstuseAppDispatch=()=>useDispatch<AppDispatch>();
The best way to solve this issue is to provide an explicit type hint to the variable for which you're facing this issue. For React Router I created frontend/lib/routes.ts and exported the route variable. For this, I was getting this error, but when I directly used it in App.tsx then I wasn't getting this error. If a variable is exported then this error arises for a few identifiers.
Uh oh!
There was an error while loading. Please reload this page.
In the backend:
In the frontend:
The text was updated successfully, but these errors were encountered: