amondnet / vercel-action

This action make a deployment with github actions instead of Vercel builder.
https://vercel.com/docs/cli
MIT License
635 stars 98 forks source link

Deployment error in node version 16 #250

Open mericozkayagan opened 8 months ago

mericozkayagan commented 8 months ago

https://github.com/amondnet/vercel-action/blob/8433ae13f35aa62d68184a8fc369ce6b0143b0a3/index.js#L191

I have not changed any vercel configuration for a while but today i have started to get the following error on my node16 deployments. Here are the error message and the according logs

npm WARN exec The following package was not found and will be installed: vercel@28.10.3

WARN exec The following package was not found and will be installed: vercel@28.10.3
Vercel CLI 28.10.3

Vercel CLI 28.10.3
Retrieving project…

Retrieving project…
Deploying nav-tech/navlungo-checkout-ui

Deploying nav-tech/navlungo-checkout-ui
Uploading [--------------------] (0.0B/1.2MB)

Uploading [--------------------] (0.0B/1.2MB)
Uploading [=====---------------] (320.0KB/1.2MB)

Uploading [=====---------------] (320.0KB/1.2MB)
Uploading [==========----------] (624.0KB/1.2MB)

Uploading [==========----------] (624.0KB/1.2MB)
Uploading [===============-----] (928.0KB/1.2MB)

Uploading [===============-----] (928.0KB/1.2MB)
Uploading [====================] (1.2MB/1.2MB)

Uploading [====================] (1.2MB/1.2MB)
Inspect: https://vercel.com/nav-tech/navlungo-checkout-ui/*** [2s]
Queued

Inspect: https://vercel.com/nav-tech/navlungo-checkout-ui/*** [2s]
Queued
https://*****.vercel.app/
https://*****.vercel.appbuilding/

Building
Error: Unexpected error. Please try again later. ()

Error: Unexpected error. Please try again later. ()
Error: The process '/opt/hostedtoolcache/node/16.20.2/x64/bin/npx' failed with exit code 1
##[debug]Node Action run completed with exit code 1
##[debug]VERCEL_ORG_ID='***'
##[debug]VERCEL_PROJECT_ID='***'
##[debug]Finishing: Run amondnet/vercel-action@v25.1.1

And here are the error logs of the failed deployment in Vercel logs

Running build in Washington, D.C., USA (East) – iad1
--
14:24:57.275 | Retrieving list of deployment files...
14:24:57.777 | Extracting deployment files...
14:24:57.899 | Previous build caches not available
14:24:58.010 | Extracted 127 deployment files...
14:24:58.185 | Using prebuilt build artifacts...
14:24:58.227 | [Error: ENOENT: no such file or directory, lstat '/vercel/path0/node_modules/next/dist/server/next-server.js'] {
14:24:58.227 | errno: -2,
14:24:58.227 | code: 'ENOENT',
14:24:58.227 | syscall: 'lstat',
14:24:58.227 | path: '/vercel/path0/node_modules/next/dist/server/next-server.js'
14:24:58.227 | }
shawncarr commented 8 months ago

We had the same issue @mericozkayagan. If you are building like npx vercel@latest build ... then attempt to deploy with less than latest it will fail with that error. We just changed to make everything use npx vercel@33.4.1 and the problem went away.

Hope this helps

mitraecp commented 6 months ago

We had the same issue @mericozkayagan. If you are building like npx vercel@latest build ... then attempt to deploy with less than latest it will fail with that error. We just changed to make everything use npx vercel@33.4.1 and the problem went away.

Hope this helps

how can i set vercel version in workflow? i try to use the same as in example. of this repo

amondnet commented 6 months ago

@mitraecp

Name Required Default Description
vercel-version     vercel-cli package version if absent we will use one declared in package.json
-- -- -- --