vuejs / vue-cli

🛠️ webpack-based tooling for Vue.js Development
https://cli.vuejs.org/
MIT License
29.78k stars 6.33k forks source link

[Typescript] Default shims-vue.d.ts prevents missing files from being detected #6325

Open bartenra opened 3 years ago

bartenra commented 3 years ago

Version

4.5.11

Environment info


  System:
    OS: Linux 5.11 Arch Linux
    CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
  Binaries:
    Node: 15.10.0 - /usr/bin/node
    Yarn: 1.22.10 - /usr/bin/yarn
    npm: 6.14.11 - /usr/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: 86.0
  npmGlobalPackages:
    @vue/cli: 4.5.11

Steps to reproduce

  1. vue create project # enable typescript
  2. cd project
  3. Modify App.vue:
import HelloWorld from './components/HelloWorldddd.vue';
  1. The following does not report any errors:
    tsc -p tsconfig.json --noEmit

What is expected?

I expected Typescript to complain about a missing import. Instead, the error goes by undetected.

What is actually happening?

No errors detected.

bartenra commented 3 years ago

Note that this also means IDEs won't report errors anymore.

vitalmipangombk commented 3 years ago

here is the erre in vue installement :"npm WARN @vue/compiler-sfc@3.0.7 requires a peer of vue@3.0.7 but none is installed. You must install peer dependencies yourself." what shoull i do with this ?