I created a monorepo with lerna (the code in github).
Inside I have two packages each package export sum function.
In app1 folder I want to import this function but vscode doesn't find the function.
Not sure why. I set everything correctly, and vscode should be offer from two paths:
@packages/pck1
@packages/pck2
/tsconfig.json
{
"extends": "./tsconfig.build.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@packages/*": ["packages/*/src"]
},
"jsx": "react",
"esModuleInterop": true,
"skipLibCheck": true,
"types": []
}
}
If you can clone my repo - run npm install then open vscode and go to apps/app1/src/index.ts and write sum. wait for typescript to find the function. you will get:
can't find the reason, any help will be appreciated.
