Build errors with Vercel CLI 39.1.1

Builds suddenly starts failing, even on redeployment of previously successful deployments. The only difference I see is that the Vercel CLI version has been upgraded to 39.1.1 in the failed deploys. Previously the successful deployments used Vercel CLI version 38.0.0.

The build gets hung up on vue-tsc --noEmit && vite build with an error that I’ve googled but without success.

Note that there were no code changes or configuration changes between the successful and failed deployments. Has anyone experienced this before?

Failed deployment on a branch (no changes) that previous deployed successfully:

[20:43:57.649] Running build in Washington, D.C., USA (East) – iad1
[20:43:58.494] Cloning github.com/l2lam/CBC-Board-System (Branch: bug/touchscreendragdrop, Commit: d66c649)
[20:43:58.503] Skipping build cache, deployment was triggered without cache.
[20:43:58.749] Cloning completed: 254.876ms
[20:43:59.257] Running "vercel build"
[20:43:59.652] Vercel CLI 39.1.1
[20:44:00.284] Running "install" command: `yarn install`...
[20:44:00.614] yarn install v1.22.19
[20:44:00.639] info No lockfile found.
[20:44:00.645] [1/4] Resolving packages...
[20:44:04.475] [2/4] Fetching packages...
[20:44:11.871] [3/4] Linking dependencies...
[20:44:12.978] [4/4] Building fresh packages...
[20:44:13.201] success Saved lockfile.
[20:44:13.209] Done in 12.60s.
[20:44:13.683] yarn run v1.22.19
[20:44:13.709] $ vue-tsc --noEmit && vite build
[20:44:13.862] 
[20:44:13.862] /vercel/path1/node_modules/vue-tsc/index.js:34
[20:44:13.862]             throw err;
[20:44:13.863]             ^
[20:44:13.863] Search string not found: "/supportedTSExtensions = .*(?=;)/"
[20:44:13.863] (Use `node --trace-uncaught ...` to show where the exception was thrown)
[20:44:13.863] 
[20:44:13.863] Node.js v20.18.1
[20:44:13.877] error Command failed with exit code 1.
[20:44:13.878] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[20:44:13.892] Error: Command "yarn build" exited with 1
[20:44:14.058] 

Successful deployment on the same branch (no changes):

[22:25:04.540] Running build in Washington, D.C., USA (East) – iad1
[22:25:04.646] Cloning github.com/l2lam/CBC-Board-System (Branch: bug/touchscreendragdrop, Commit: d66c649)
[22:25:05.227] Cloning completed: 578.299ms
[22:25:06.554] Restored build cache from previous deployment (74Nge9xgiCF719H1WgND3nym16ri)
[22:25:06.641] Running "vercel build"
[22:25:07.131] Vercel CLI 38.0.0
[22:25:08.031] Running "install" command: `yarn install`...
[22:25:08.361] yarn install v1.22.19
[22:25:08.389] info No lockfile found.
[22:25:08.396] [1/4] Resolving packages...
[22:25:12.917] [2/4] Fetching packages...
[22:25:20.629] [3/4] Linking dependencies...
[22:25:22.051] [4/4] Building fresh packages...
[22:25:22.269] success Saved lockfile.
[22:25:22.275] Done in 13.92s.
[22:25:23.217] yarn run v1.22.19
[22:25:23.244] $ vue-tsc --noEmit && vite build
[22:25:24.682] e[36mvite v5.4.11 e[32mbuilding for production...e[36me[39m
[22:25:24.777] transforming...
[22:25:29.448] e[32m✓e[39m 407 modules transformed.
[22:25:29.697] rendering chunks...
[22:25:30.069] computing gzip size...
[22:25:30.107] e[2mdist/e[22me[32mindex.html                                         e[39me[1me[2m    1.20 kBe[22me[1me[22me[2m │ gzip:   0.53 kBe[22m
[22:25:30.108] e[2mdist/e[22me[2massets/e[22me[32mmaterialdesignicons-webfont-CveiMJFx.woff2  e[39me[1me[2m  343.66 kBe[22me[1me[22m
[22:25:30.108] e[2mdist/e[22me[2massets/e[22me[32mmaterialdesignicons-webfont-BbcIfeS3.woff   e[39me[1me[2m  493.82 kBe[22me[1me[22m
[22:25:30.108] e[2mdist/e[22me[2massets/e[22me[32mmaterialdesignicons-webfont-Df9Q6YdI.ttf    e[39me[1me[2m1,089.80 kBe[22me[1me[22m
[22:25:30.108] e[2mdist/e[22me[2massets/e[22me[32mmaterialdesignicons-webfont-YdEl25M1.eot    e[39me[1me[2m1,090.02 kBe[22me[1me[22m
[22:25:30.109] e[2mdist/e[22me[2massets/e[22me[35mindex-CGXQhXgm.css                          e[39me[1me[2m  608.31 kBe[22me[1me[22me[2m │ gzip:  87.77 kBe[22m
[22:25:30.109] e[2mdist/e[22me[2massets/e[22me[36mbrowser-CqRgJB7q.js                         e[39me[1me[2m    0.30 kBe[22me[1me[22me[2m │ gzip:   0.25 kBe[22m
[22:25:30.109] e[2mdist/e[22me[2massets/e[22me[36mindex-D_Jduvs6.js                           e[39me[1me[33m  612.60 kBe[39me[22me[2m │ gzip: 200.83 kBe[22m
[22:25:30.109] e[33m
[22:25:30.109] (!) Some chunks are larger than 500 kB after minification. Consider:
[22:25:30.109] - Using dynamic import() to code-split the application
[22:25:30.109] - Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
[22:25:30.110] - Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.e[39m
[22:25:30.110] e[32m✓ built in 5.40se[39m
[22:25:30.141] Done in 6.93s.
[22:25:30.216] Build Completed in /vercel/output [22s]
[22:25:30.249] Deploying outputs...
[22:25:31.706] 
[22:25:31.967] Deployment completed
[22:25:36.876] Uploading build cache [31.35 MB]...
[22:25:37.442] Build cache uploaded: 568.606ms

Vue App, Vite, TS

Update

I tried specifying an older version of the Vercel CLI using the envirnoment variable (on the project) VERCEL_CLI_VERSION. The result was the same error. So it looks like this is not related to the Vercel CLI version.

The problem seems to be with the latest version of vue-tsc (2.1.10). I upgraded to that version and can reproduce the error locally. I still don’t know wht it means though.

Probably it’s because vue-tsc@1 does not support TypeScript 5.6.

npm create vite uses the cache stored locally regardless of a new version published on npm, it’s recommended to add @latest when using npm create (e.g. npm create vite@latest).

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.