Why does Vercel repeat downloading and installing on build?

Viewed 47

I have a Vite and Vue.js webapp hosted on Vercel. Every time I deploy it, the downloading/installing process happens multiple times — 7 to be precise. Why does it repeat?

Build log:

Cloning github.com/* (Branch: main, Commit: *)
Cloning completed: 719.461ms
Installing build runtime...
Build runtime installed: 1.038s
Installing build runtime...
Build runtime installed: 985.054ms
Installing build runtime...
Build runtime installed: 930.743ms
Installing build runtime...
Build runtime installed: 923.02ms
Installing build runtime...
Build runtime installed: 1.004s
Installing build runtime...
Build runtime installed: 911.844ms
Installing build runtime...
Build runtime installed: 1.728s
Looking up build cache...
Looking up build cache...
Looking up build cache...
Looking up build cache...
Looking up build cache...
Build cache downloaded [50.34 MB]: 5158.433ms
Build cache downloaded [50.34 MB]: 5433.283ms
Build cache downloaded [50.34 MB]: 5694.941ms
Build cache downloaded [50.34 MB]: 6005.223ms
Installing dependencies...
Build cache downloaded [50.34 MB]: 5981.376ms
Installing dependencies...
Installing dependencies...
Installing dependencies...
Installing dependencies...
up to date in 2s
76 packages are looking for funding
run `npm fund` for details
up to date in 1s
76 packages are looking for funding
run `npm fund` for details
up to date in 1s
76 packages are looking for funding
run `npm fund` for details
up to date in 2s
76 packages are looking for funding
run `npm fund` for details
up to date in 2s
76 packages are looking for funding
run `npm fund` for details
Installing dependencies...
Looking up build cache...
up to date in 1s
76 packages are looking for funding
run `npm fund` for details
Build cache downloaded [50.34 MB]: 3225.874ms
Installing dependencies...
up to date in 1s
76 packages are looking for funding
run `npm fund` for details
Detected `package-lock.json` generated by npm 7+...
Running "npm run build"
> *@* build
> vite build
vite v2.9.13 building for production...
transforming...
✓ 109 modules transformed.
rendering chunks...

Why does Vercel repeat downloading and installing on build?

My “vercel.json” file:

{
"cleanUrls": false,
"trailingSlash": false,
"rewrites": [
    { "source": "([^@.]*)", "destination": "/index.html" }
],
"redirects": [
    { "source": "/", "destination": "*" }
],
"headers": [
    {
        "source" : "(.*)",
        "headers" : [
            { "key" : "Content-Security-Policy" , "value" : "*" }
        ]
    }
]
}

My “package.json” file:

{
"name": "*",
"version": "*",
"scripts": {
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview --port 4173",
    "test:unit": "vitest --environment jsdom",
    "test:e2e": "start-server-and-test preview http://127.0.0.1:4173/ 'cypress open --e2e'",
    "test:e2e:ci": "start-server-and-test preview http://127.0.0.1:4173/ 'cypress run --e2e'",
    "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore"
},
"dependencies": {
    "@fortawesome/fontawesome-svg-core": "^6.1.1",
    "@fortawesome/free-brands-svg-icons": "^6.1.1",
    "@fortawesome/free-regular-svg-icons": "^6.1.1",
    "@fortawesome/free-solid-svg-icons": "^6.1.1",
    "@fortawesome/vue-fontawesome": "^3.0.1",
    "@popperjs/core": "^2.11.5",
    "bootstrap": "^5.1.3",
    "dotenv": "^16.0.1",
    "mitt": "^3.0.0",
    "mongodb": "^4.7.0",
    "node-mailjet": "^5.0.1",
    "vue": "^3.2.37",
    "vue-router": "^4.0.16"
},
"devDependencies": {
    "@rushstack/eslint-patch": "^1.1.0",
    "@vitejs/plugin-vue": "^2.3.3",
    "@vue/eslint-config-prettier": "^7.0.0",
    "@vue/test-utils": "^2.0.0",
    "axios": "^0.27.2",
    "cheerio": "^1.0.0-rc.12",
    "crypto": "^1.0.1",
    "cypress": "^10.1.0",
    "eslint": "^8.5.0",
    "eslint-plugin-cypress": "^2.12.1",
    "eslint-plugin-vue": "^9.0.0",
    "jsdom": "^20.0.0",
    "prettier": "^2.5.1",
    "start-server-and-test": "^1.14.0",
    "vercel": "^26.0.0",
    "vite": "^2.9.12",
    "vitest": "^0.15.1"
}
}
0 Answers
Related