Vue 2.7+ no longer fails on and report type errors in build and serve commands

This issue has been created since 2022-07-29.

Version

2.7.8

Reproduction link

github.com

Steps to reproduce

Based from the vuejs-type-bug-demo root folder:

  • cd ./hello-world-2.6 && npm install && npm run build
  • cd ./hello-world-2.7 && npm install && npm run build

What is expected?

In 2.7 I expect the errors in typing to fail the build as it does in 2.6

What is actually happening?

Succeeding the build without any errors thrown

derat wrote this answer on 2022-08-17

I noticed this as well after upgrading a project from 2.6.14 to 2.7.8. Type errors seem to be silently ignored by both npm run serve and npm run build.

nieyuyao wrote this answer on 2022-08-19

This seems to be a compiler-sfc issue that causes the ForkTsCheckerWebpackPlugin to not get the correct script. This pr may solve the issue.

yyx990803 wrote this answer on 2022-08-19

This relies on ts-loader to fix its compatibility with Vue 2.7.

The latest recommendation, however, is to avoid doing type check as part of the webpack build, and instead using vue-tsc, which also works with Vue 2.7+. You can start it in a separate process in watch mode.

RuudV wrote this answer on 2022-09-02

Thanks for your reply. We will try that, but it would be nice if this got mentioned in the upgrade to vue 2.7+, so users can determine if they can spare the extra time invested to setup vue-tsc and disable type checking in webpack during serve and build commands.

More Details About Repo
Owner Name vuejs
Repo Name vue
Full Name vuejs/vue
Language TypeScript
Created Date 2013-07-29
Updated Date 2022-09-27
Star Count 199644
Watcher Count 6098
Fork Count 32848
Issue Count 587

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
Question: Examples of customising topic names using Jinja Templates 0 2022-04-04 2022-09-14
Hey ! Suggestion 🗡️ 1 2021-03-18 2022-09-14
csi-driver fail to mount certs volume after running for some time 1 2022-02-04 2022-09-11
No changes being updated 4 2021-05-05 2022-07-29
use color stack is order dependant 3 2021-11-19 2022-08-13
Починить переадресацию на материалах 2 2022-07-21 2022-09-06
risks of running on non-certified hardware? 2 2021-08-19 2022-08-11
FOMOD ModConfig.xml gameDependency version check not working in Vortex 2 2022-01-02 2022-08-11
activity 销毁后,怎么销毁 PictureSelector 打开的页面 0 2022-03-21 2022-09-14
帮忙解答一下Mixin和Diff使用的问题和bypass与TUN的优先级问题 2 2021-12-26 2022-09-19
Not support FlutterActivity 6 2018-12-18 2022-09-16
Getting this error after installing 1 2022-01-07 2022-09-04
能有机会开发brook脚本? 1 2021-09-01 2022-01-14
PowerShell example 3 2022-01-07 2022-01-15
fix js when right bar does not appear 0 2022-05-15 2022-09-11
Change Font Size and Font Family doesn't work properly 7 2022-05-23 2022-09-16
Refactor the cast() implementation so different subtypes can override 0 2021-07-02 2022-08-10
Use optional peerDependency to ensure latest @intlify/vue-i18n-loader is used with Vue I18n v9 2 2021-10-04 2022-07-19
Collect analytics 0 2021-07-27 2022-01-16
Emerald Mainnet: my balance is reduced but won't showing on tofunft as an offer 1 2022-01-19 2022-09-14
Add type hints 1 2020-10-06 2022-01-09
typo in centreon_oracle.pl leads to calling an undefined function 1 2021-09-17 2022-08-30
Fails to list "-lwx_mswu_stc-3.0" in library list 2 2021-08-02 2022-09-20
`useInView`'s `inView` always returns `undefined` with Next.js v12.1.6, only detects changes with `<InView/>` ? 3 2022-06-16 2022-09-19
Controls: Fail gracefully if conditional args improperly specified 1 2022-05-09 2022-09-21
ReferenceError: Cannot access 'schema' before initialization 4 2021-12-10 2022-08-26
Flutter mobile web video issues 6 2022-08-04 2022-08-30
Documentation has invalid links for contributors. 6 2021-10-18 2022-09-19
UX Improvement: don't duplicate play, play next, play later in bulk action buttons 4 2021-12-24 2022-09-26
User experience: starting the collector without config file yields a cryptic message 8 2022-07-07 2022-09-12
how to set host_vars with ansible-runner 1 2021-10-23 2022-08-12
Using derived types with VBScript 2 2022-06-15 2022-09-07
Support for GL-G-003P Garden lights 4 2022-07-14 2022-09-08
Building BE without `-DBUILD_JAVA=0` option cause camke failed. 0 2022-06-13 2022-08-21
Running ktlint with Maven 2 2021-04-14 2022-09-17
4qrcode.com 0 2021-12-23 2021-12-17
Service Host: State Repository Service 3 2022-06-03 2022-09-24
Any way to add "synthetic" timestamp? 34 2021-11-23 2022-09-04
Header to request issue 4 2021-08-12 2022-08-03
SSH authentication fails if constraints/compute.requireOsLogin is enforced 36 2022-05-19 2022-08-11
AWS lambda functions information 0 2022-06-06 2022-09-18
conflicting types for 'tuntap_open' (Error in cross compiling Windows version with MinGW in Linux) 11 2021-02-08 2022-09-25
Notebooks on MacOS Monterey do not all use the proper .zshrc or .bash_profile 2 2021-12-21 2022-09-01
WeNet RelPositionalMHA plugin can't add_plugin_v2 3 2022-08-04 2022-08-30
3D Building mesh (and included terrain mesh) covers up Texture Tile Layer 0 2022-01-03 2022-09-16
event subscription does not ensure finalization 0 2021-03-04 2022-07-27
App and DeviceResources 1 2022-09-22 2022-09-19
exclude empty-name container metrics in resource usage 3 2021-06-28 2022-09-22
[Venus] 各组件增加 Version 接口 1 2022-07-25 2022-08-14
Can't compile chilt theme after last bolckbase update 0 2021-10-27 2022-07-23