I'm having trouble adding a github repository to my Yarn monorepo. The repo I want to add has TS compiled code for commonjs an es module in dist folder.
I've added the repo, which I want to consume, to the package.json in this format:
"dependencies": {
"@foo/some-lib": "[email protected]:zantinger/some-lib.git"
}
but I keep getting the error message "Cannot find module..." (from my LSP language server, I think).
I can confirm, that webpack is able to build the project, even with the diagnositc error from the LSP-server. So it seems to be a tsserver issue.
Here's what I've tried so far:
Is there a way to add a github repository to a Yarn monorepo with zero install and PnP active? Any suggestions on what else I could try to resolve this issue?
I'm using:
Feel free to have a look at my example repos:
I was able to solve the problem myself now. typescript needs a skd from yarn. I had tried to install it before, but I didn't realize that typescript had to exist as a dependency in the root directory. I only had typescript in the workspaces as a dev-dependency. adding typescript as a dependency at root level and running yarn dlx @yarnpkg/sdks vim again fixed the problem now.