Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting errors after upgrading to vercel-action #4

Closed
jakobrosenberg opened this issue May 18, 2020 · 9 comments · Fixed by #5
Closed

Getting errors after upgrading to vercel-action #4

jakobrosenberg opened this issue May 18, 2020 · 9 comments · Fixed by #5
Assignees
Labels
Milestone

Comments

@jakobrosenberg
Copy link

I can build the app and visit it on the link generated by Vercel. But for some reason Vercel can't publish on the production url. Instead it produces an error that it can't find the link it generated.

Error! Failed to find deployment "https://routify-2020-l4pp0d9s5.now.sh" in jakobrosenberg

Logs
Run amondnet/vercel-action@v19
set environment for vercel cli
set env variable : VERCEL_ORG_ID
set env variable : VERCEL_PROJECT_ID
/opt/hostedtoolcache/node/12.16.3/x64/bin/npx vercel --prod -t *** -m githubCommitSha=0087f6d8ff5884ed1f6e39d0ed635eeceb6b2cfd -m githubCommitAuthorName=jakobrosenberg -m githubCommitAuthorLogin=jakobrosenberg -m githubDeployment=1 -m githubOrg=sveltech -m githubRepo=routify-site-2020 -m githubCommitOrg=sveltech -m githubCommitRepo=routify-site-2020 -m githubCommitMessage=bump routify -m githubCommitRef=refs/heads/master
Vercel CLI 19.0.1

Vercel CLI 19.0.1
The `name` property in now.json is deprecated (https://zeit.ink/5F)

The `name` property in now.json is deprecated (https://zeit.ink/5F)
- Deploying sveltaforce/routify-2020

- Deploying sveltaforce/routify-2020

Inspect: https://vercel.com/sveltaforce/routify-2020/l4pp0d9s5 [6s]

Inspect: https://vercel.com/sveltaforce/routify-2020/l4pp0d9s5 [6s]
https://routify-2020-l4pp0d9s5.now.sh
https://routify-2020-l4pp0d9s5.now.sh- Queued

- Queued

- Building

- Building

- Completing

- Completing

Production: https://routify.dev [39s]

Production: https://routify.dev [39s]
set preview-url output
/opt/hostedtoolcache/node/12.16.3/x64/bin/npx vercel inspect https://routify-2020-l4pp0d9s5.now.sh -t ***
Vercel CLI 19.0.1

Vercel CLI 19.0.1
- Fetching deployment "https://routify-2020-l4pp0d9s5.now.sh" in jakobrosenberg

- Fetching deployment "https://routify-2020-l4pp0d9s5.now.sh" in jakobrosenberg

Error! Failed to find deployment "https://routify-2020-l4pp0d9s5.now.sh" in jakobrosenberg

Error! Failed to find deployment "https://routify-2020-l4pp0d9s5.now.sh" in jakobrosenberg
##[error]The process '/opt/hostedtoolcache/node/12.16.3/x64/bin/npx' failed with exit code 1
@amondnet amondnet added the Type: Bug Bug or Bug fixes label May 18, 2020
@amondnet
Copy link
Owner

amondnet commented May 18, 2020

hi @jakobrosenberg ,

amondnet/now-deployment#50 (comment)

Team project builds are failing because now inspect uses default scope. This leads to failing builds, because the team project can't be found within your personal scope. It used to work with now 18.0.0, but fails with now 19.0.1.

Currently, you can do this through a vercel configuration file.
https://vercel.com/docs/configuration#project/scope

{
  "github": {
     "enabled": false
  },
  "version" : 2,
  "scope": "my-team"
}

I will add this feature to the next version.

@amondnet
Copy link
Owner

amondnet commented May 18, 2020

related amondnet/now-deployment#50

@amondnet amondnet added this to the 19.0.1+1 milestone May 18, 2020
@amondnet amondnet self-assigned this May 18, 2020
@amondnet amondnet modified the milestones: 19.0.1+1, v19.0.1 May 18, 2020
@amondnet amondnet modified the milestones: v19.0.1, 19.0.1+1 May 18, 2020
@amondnet
Copy link
Owner

amondnet commented May 18, 2020

@jakobrosenberg
Fixed in #5

      - uses: vercel-action@v19 //v19.0.1+1
        id: vercel-action
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          vercel-token: ${{ secrets.VERCEL_TOKEN }}
          vercel-org-id: ${{ secrets.VERCEL_ORG_ID_TEAM_SCOPE }}
          vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID_TEAM_SCOPE }}
          working-directory: example/team-scope
          scope: ${{ secrets.VERCEL_SCOPE }}

@jakobrosenberg
Copy link
Author

All of a sudden we're getting this bug again. I've tried updating to v19.0.1+3, but the bug is still there.

Vercel CLI 19.2.0
Error! Failed to find deployment "https://routify-2020-jgai3fuys.vercel.app" in jakobrosenberg

@amondnet amondnet reopened this Aug 13, 2020
@amondnet
Copy link
Owner

amondnet commented Aug 13, 2020

@jakobrosenberg I think this is related #24
This action use scope everywhere npx is used.
Set the scope value and try again.
scope: ${{ secrets.VERCEL_SCOPE }}

This is related latest "inspect" bug. #27 #28 #29

@amondnet
Copy link
Owner

amondnet commented Aug 13, 2020

@jakobrosenberg I have tested it. If scope is not set, it will not work.

  1. use scope -> succeeded
  2. with out scope -> failed
  3. use vercel-project-name -> succeeded

https://github.com/amondnet/vercel-action/blob/deploy-with-out-scope/.github/workflows/example-scope.yml
https://github.com/amondnet/vercel-action/actions/runs/207149992

@jakobrosenberg
Copy link
Author

Hi @amondnet, do I read it correctly, that either scope or vercel-project-name is required, but not both?

Also, what is scope in this context?

@amondnet
Copy link
Owner

Hi @jakobrosenberg

scope is your username or team slug.

https://vercel.com/docs/platform/users-and-teams#

There are identity forms available on Vercel, called "scopes": Users and teams.

https://vercel.com/docs/cli#commands/overview/project-linking

When running vercel in a directory, Vercel CLI needs to know which scope and Project you want to deploy your directory to.


vercel-project-name may be routify-2020.

@jakobrosenberg
Copy link
Author

That seemed to fix it. Thanks @amondnet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants