turbo: linking remoteCache not working with Vercel
What version of Turborepo are you using?
latest
What package manager are you using / does the bug impact?
pnpm
What operating system are you using?
Mac
Describe the Bug
When attempting to connect the remote cache to Vercel, I get this error:
could not get team information.
{"error":{"code":"forbidden","message":"Not authorized"}}
Expected Behavior
I am able to successfully connect to Vercel’s remove cache!
To Reproduce
- Install the pnpm starter
npx create-turbo@latest .
- Select the
pnpmoption for creation
- Log into Vercel
pnpm dlx turbo login
- Link the repo to Vercel
pnpm dlx turbo link
This step fails with the following error messages.
could not get team information.
{"error":{"code":"forbidden","message":"Not authorized"}}
Command failed with exit code 1: /Users/<UserName>/Library/pnpm/store/v3/tmp/dlx-3027/node_modules/.bin/turbo link
I assumed this has to do with me not having a Vercel team. I tried to set up a team and link, but I received the same error.
Thanks so much!!! I love Turborepo!
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (8 by maintainers)
@yowainwright Thanks for sticking with us on this one!
@d4mr that path is for macOS. On Linux it is at:
~/.config/turborepo/config.json@yowainwright This is an extremely strange issue. Can you do me a favor and run this?
I’m wondering if we’re, for some reason, failing to write the login token to disk. Possibly file permissions, who knows.
After running this you can clear the local cache via
rm -rf node_modules/.cache/turboand re-runpnpm run build --token=<token> --team=<team-slug>to observe cache hits.@yowainwright , I think this is something to do with turbo’s token storage in your env. Since you are able to log in. Are you able to generate a token on vercel and pass that in via:
https://turborepo.org/docs/reference/command-line-reference#--token You can generate a token via: https://vercel.com/account/tokens
for example: