I'm working with a Lerna monorepo that uses Yarn workspaces and has the following structure:
-
- packages
-- web
-- backend
-- client
Each package in the monorepo has its own tsconfig.json file. However, I'm experiencing an issue with the packages/client/tsconfig.json file where I can't add the exclude and include attributes. When I try to add them, VS Code highlights the options in red and shows an error message that says Unknown compiler option 'exclude' and Unknown compiler option 'include'.
If anyone has encountered a similar issue and could provide guidance, I would greatly appreciate it.
Related configuration
// package.json
{
"name": "worksafe",
"version": "1.0.0",
"private": true,
"main": "index.js",
"license": "MIT",
"workspaces": [
"packages/*"
],
"devDependencies": {
"eslint": "^8.39.0",
"lerna": "^6.6.1",
"prettier": "^2.8.8"
},
"scripts": {
"build": "lerna run build",
"build:worksafe-client": "lerna run build --scope worksafe-client",
"develop:web": "lerna run develop --scope web --stream --bail",
"develop:backend": "lerna run develop --scope backend --stream --bail",
"develop": "lerna run develop --stream --bail",
"storybook": "lerna run --scope web storybook --no-open"
}
}
// packages/client/package.json
{
"name": "worksafe-client",
"version": "1.0.0",
"license": "MIT",
"private": true,
"main": "./dist/index.js",
"dependencies": {
"@types/node": "^18.16.3",
"@types/qs": "^6.9.7",
"axios": "^1.4.0",
"qs": "^6.11.1",
"ts-node": "^10.9.1",
"typescript": "^5.0.4"
},
"scripts": {
"build": "tsc",
"test": "jest"
},
"devDependencies": {
"@types/jest": "^29.5.1",
"jest": "^29.5.0",
"ts-jest": "^29.1.0"
}
}