A create-react-app sites in client. It uses Typescript.
"devDependencies": {
"typescript": "^4.1.3",
.....
React app has it's own package-json and node_modules
My-Project
├── package.json
├── node_modules
├── ....
├──client
├── package.json
├── node_modules
├── ....
The root folder has it's own package.json and node_modules.
There is a library that uses Typescript as a dev dependency.
"node_modules/typechain/node_modules/ts-essentials": {
"version": "6.0.7",
"resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-6.0.7.tgz",
"integrity": "sha512-2E4HIIj4tQJlIHuATRHayv0EfMGK3ris/GRk1E3CFnsZzeNV+hUmelbaTZHLtXaZppM5oLhHRtO04gINC4Jusw==",
"dev": true,
"peerDependencies": {
"typescript": ">=3.7.0"
}
},
npm ERR! Found: typescript@4.2.3
npm ERR! node_modules/typescript
npm ERR! dev typescript@"^4.1.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional typescript@"^3.2.1" from react-scripts@4.0.1
This results in the above.
Is there a way to solve this WITHOUT using --force or --legacy-peer-deps?