How to reproduce:
npm inpx tsc --noEmitshould give you an error as expectednpm i -D webpack-dev-server- now if you run
npx tsc --noEmitthe error is gone
Same happens for the package @types/enzyme:
- undo the changes in
package.json npm i -D @types/enzymenpx tsc --noEmithas no errors either