I'm trying to link a local library into bigger react project but without any success.
In dist folder of library I do npm link
.
In the bigger project I do npm link @myScope/myLibrary
and it looks like it installed correctly.
But when I try to build it and the frontend fails and I get maany errors like these:
ERROR in ./src/components/shared/searchForm/SearchForm.tsx:
TS2786: 'Close' cannot be used as a JSX component.
Its element type 'ReactElement<any, any> ... | null' is not a valid JSX element.
I know there could be many problems with the building process, but I think it could be something small.
When I just build it and copy the dist folder into node_modules, then it works, but I'd like to debug it so the library points to its source files, if it is possible somehow.