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

Vercel build errors in runtime due to Sentry CLI binary for arch not found #1849

Closed
mcmxcdev opened this issue Nov 30, 2023 · 28 comments
Closed
Labels

Comments

@mcmxcdev
Copy link

Environment

@sentry/cli v2.22.3 on Ubuntu 23.10

Steps to Reproduce

When attempting to upgrade @sentry/sveltekit from 7.76.0 to 7.83.0, we encounter this runtime error on a Vercel preview deployment URL:

2023-11-29T18:38:58.472Z	undefined	ERROR	Error: Sentry CLI binary for this platform/architecture not found!
It seems like none of the "@sentry/cli" package's optional dependencies got installed. Please make sure your package manager is configured to install optional dependencies. If you are using npm to install your dependencies, please don't set the "--no-optional" or "--omit=optional" flags. Sentry CLI needs the "optionalDependencies" feature in order to install its binary.
    at getBinaryPath (/var/task/node_modules/.pnpm/@sentry+cli@2.22.3/node_modules/@sentry/cli/js/helper.js:116:13)
    at Object.<anonymous> (/var/task/node_modules/.pnpm/@sentry+cli@2.22.3/node_modules/@sentry/cli/js/helper.js:129:18)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at r.<computed>.e._load (/var/task/___vc/__launcher/__launcher.js:14:2516)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at Object.<anonymous> (/var/task/node_modules/.pnpm/@sentry+cli@2.22.3/node_modules/@sentry/cli/js/index.js:4:16)
INIT_REPORT Init Duration: 977.05 ms	Phase: invoke	Status: error	Error Type: Runtime.ExitError
RequestId: 9b0d05a2-8a1e-4975-b480-92d551a0cf9e Error: Runtime exited with error: exit status 1
Runtime.ExitError

The issue is most likely related to https://github.com/getsentry/sentry-cli/releases/tag/2.22.3

The package manager in use is pnpm, optional dependencies are not disabled, and the .npmrc file looks as follows:

engine-strict=true
enable-pre-post-scripts=true
strict-peer-dependencies=true
update-notifier=false

Expected/Actual Result

Deployment should work as usual

@Patrick-Ullrich
Copy link

Patrick-Ullrich commented Nov 30, 2023

Same issue happening here using npm. sveltekit(v1) build on vercel. We didn't upgrade sveltekit when this started happening, so I assume this version got pulled in on fresh install

Same issue in sentry-javascript repro: getsentry/sentry-javascript#9718

@szokeasaurusrex
Copy link
Member

Thank you for reporting this bug, @mcmxcdev. We are looking into it. Just to confirm, are you still able to use @sentry/cli version 2.22.2 or lower without error?

@Patrick-Ullrich
Copy link

Patrick-Ullrich commented Dec 1, 2023

FWIW we can't even downgrade, seems like @sentry/cli is being pulled in:

@sentry/sveltekit@7.50.0
    └─┬ @sentry/vite-plugin@0.6.1
      └─┬ @sentry/bundler-plugin-core@0.6.1
        └── @sentry/cli@2.22.3

When looking at: https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/main/packages/bundler-plugin-core/package.json#L55

the ^ and no major versions above makes me assume that no matter how much we downgrade, this version (patch) will continue to be pulled in.

@mcmxcdev
Copy link
Author

mcmxcdev commented Dec 1, 2023

@szokeasaurusrex Yes, we locked @sentry/sveltekit to 7.76.0 to avoid our builds from breaking.

We haven't investigated further which version after 7.76.0 works and which one doesn't anymore (due to pulling in @sentry/cli@2.22.3)

@szokeasaurusrex
Copy link
Member

Can you try redeploying on Vercel without build cache? Thank you!

@smart
Copy link

smart commented Dec 3, 2023

We're also facing this issue. The workaround has been to peg "@sentry/cli": "2.22.2". Deploys using "@sentry/sveltekit": "^7.84.0", and previous versions were successful by locking this version.

@lovell
Copy link

lovell commented Dec 4, 2023

This is caused by a Vercel bug/feature - please see vercel/nft#371

@followdarko
Copy link

Faced the same issue, thanks @smart for workaround!

@ni-co
Copy link

ni-co commented Dec 6, 2023

Pegging the version to @sentry/cli": "2.22.2 using pnpm and any version of @sentry/sveltekit worked around the build errors. However, our function is still crashing when being invoked because it's looking for @sentry/cli 2.22.3. From our Vercel logs:

It seems like none of the "@sentry/cli" package's optional dependencies got installed. Please make sure your package manager is configured to install optional dependencies. If you are using npm to install your dependencies, please don't set the "--no-optional" or "--omit=optional" flags. Sentry CLI needs the "optionalDependencies" feature in order to install its binary.
    at getBinaryPath (/var/task/node_modules/.pnpm/@sentry+cli@2.22.3/node_modules/@sentry/cli/js/helper.js:116:13)
    at Object.<anonymous> (/var/task/node_modules/.pnpm/@sentry+cli@2.22.3/node_modules/@sentry/cli/js/helper.js:129:18)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at r.<computed>.e._load (/var/task/___vc/__launcher/bridge-server-72TT5FOD.js:1:1574)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object.<anonymous> (/var/task/node_modules/.pnpm/@sentry+cli@2.22.3/node_modules/@sentry/cli/js/index.js:4:16)
INIT_REPORT Init Duration: 1083.56 ms	Phase: invoke	Status: error	Error Type: Runtime.ExitError
Error: Runtime exited with error: exit status 1

moonmeister added a commit to wpdecoupled/wpgraphql-repl that referenced this issue Dec 10, 2023
moonmeister added a commit to wpdecoupled/wpgraphql-repl that referenced this issue Dec 10, 2023
* main:
  fix: make resolution work
  fix: bad sentry dep on vercel getsentry/sentry-cli#1849
  Revert "chore: major version updates vite"
  feat: add preconnects for wordpress assets to be downloaded
  chore: major version updates vite
  chore: update deps
  chore: cleanup misc
  chore: update smui
  fix: properly order imports/exports
  fix: add aria roles to resizable divider
  chore: format code
  refactor: remove unneeded prettier config lines
ctoth added a commit to MongooseMoo/react-client that referenced this issue Dec 18, 2023
joshnuss added a commit to joshnuss/hypersonic that referenced this issue Dec 20, 2023
@Gipetto
Copy link

Gipetto commented Dec 22, 2023

Sveltekit 2 users would need to downgrade the framework to fix this issue. Is there anyone working on this?
Also, naive question: why is the cli being used in a production client/server build?

Update: I've tried the fix noted above that pins @sentry/cli to 2.22.2 but no dice. I've downgraded to SK 1 and reverted all the functionality introduced in the newer versions of the Sentry SDK but I just can't make it work. Like @ni-co above, I can build, but running on Vercel just fails.

Probably gonna give up here.

@rohanrajpal
Copy link

Sveltekit 2 users would need to downgrade the framework to fix this issue. Is there anyone working on this? Also, naive question: why is the cli being used in a production client/server build?

Update: I've tried the fix noted above that pins @sentry/cli to 2.22.2 but no dice. I've downgraded to SK 1 and reverted all the functionality introduced in the newer versions of the Sentry SDK but I just can't make it work. Like @ni-co above, I can build, but running on Vercel just fails.

Probably gonna give up here.

+1 a bummer as both a paid sentry and vercel user

if nothing, a guide on a workaround is expected at the very least.

@adinauer
Copy link
Member

Sorry for the delay here. It'll take a little longer than usual with maintainers being out of office for the holidays.

@lforst
Copy link
Member

lforst commented Dec 27, 2023

We've pinged Vercel about this. I'll see if I can find a workaround for this this week.

@gwax
Copy link

gwax commented Dec 27, 2023

Someone pointed me here. I'm running SvelteKit + Sentry + Vercel without issue right now. My package manager is yarn.

Here are some excerpts from package.json

{
  ...
  "devDependencies": {
    ...
    "@sveltejs/adapter-auto": "^2.1.1",
    "@sveltejs/kit": "^1.27.4",
    ...
    "svelte": "^4.2.3",
    ...
    "vercel": "^32.5.3",
    "vite": "^4.5.1",
    ...
  },
  "dependencies": {
    ...
    "@sentry/integrations": "^7.91.0",
    "@sentry/sveltekit": "^7.91.0",
    ...
    "@sveltejs/adapter-vercel": "^3.0.3",
    ...
  },
  ...
}

and yarn.lock

...

"@sentry-internal/feedback@7.91.0":
  version "7.91.0"
  resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-7.91.0.tgz#be09e5aec2959fcf503e2cf78496d5e2d263bc5a"
  integrity sha512-SJKTSaz68F5YIwF79EttBm915M2LnacgZMYRnRumyTmMKnebGhYQLwWbZdpaDvOa1U18dgRajDX8Qed/8A3tXw==
  dependencies:
    "@sentry/core" "7.91.0"
    "@sentry/types" "7.91.0"
    "@sentry/utils" "7.91.0"

"@sentry-internal/tracing@7.80.1":
  version "7.80.1"
  resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.80.1.tgz#b0e993265aa75743787d84e6c0655ed17e4bac0f"
  integrity sha512-5gZ4LPIj2vpQl2/dHBM4uXMi9OI5E0VlOhJQt0foiuN6JJeiOjdpJFcfVqJk69wrc0deVENTtgKKktxqMwVeWQ==
  dependencies:
    "@sentry/core" "7.80.1"
    "@sentry/types" "7.80.1"
    "@sentry/utils" "7.80.1"

"@sentry-internal/tracing@7.91.0":
  version "7.91.0"
  resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.91.0.tgz#fbb6e1e3383e1eeee08633384e004da73ac1c37d"
  integrity sha512-JH5y6gs6BS0its7WF2DhySu7nkhPDfZcdpAXldxzIlJpqFkuwQKLU5nkYJpiIyZz1NHYYtW5aum2bV2oCOdDRA==
  dependencies:
    "@sentry/core" "7.91.0"
    "@sentry/types" "7.91.0"
    "@sentry/utils" "7.91.0"

"@sentry/browser@7.91.0":
  version "7.91.0"
  resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.91.0.tgz#de3b9ae3ca7716a35cfabc97ac376944a67e6e34"
  integrity sha512-lJv3x/xekzC/biiyAsVCioq2XnKNOZhI6jY3ZzLJZClYV8eKRi7D3KCsHRvMiCdGak1d/6sVp8F4NYY+YiWy1Q==
  dependencies:
    "@sentry-internal/feedback" "7.91.0"
    "@sentry-internal/tracing" "7.91.0"
    "@sentry/core" "7.91.0"
    "@sentry/replay" "7.91.0"
    "@sentry/types" "7.91.0"
    "@sentry/utils" "7.91.0"

"@sentry/bundler-plugin-core@0.6.1":
  version "0.6.1"
  resolved "https://registry.yarnpkg.com/@sentry/bundler-plugin-core/-/bundler-plugin-core-0.6.1.tgz#6c6a2ff3cdc98cd0ff1c30c59408cee9f067adf2"
  integrity sha512-EecCJKp9ERM7J93DNDJTvkY78UiD/IfOjBdXWnaUVE0n619O7LfMVjwlXzxRJKl2x05dBE3lDraILLDGxCf6fg==
  dependencies:
    "@sentry/cli" "^2.17.0"
    "@sentry/node" "^7.19.0"
    "@sentry/tracing" "^7.19.0"
    find-up "5.0.0"
    glob "9.3.2"
    magic-string "0.27.0"
    unplugin "1.0.1"
    webpack-sources "3.2.3"

"@sentry/cli@^2.17.0":
  version "2.21.5"
  resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.21.5.tgz#9ee4c51b267ac5ba8cdbf9bb9d4e8b74410d9669"
  integrity sha512-RqKBqE10pb7zh0G/YiYVdX/MqenDYIgLGcaCqbszTAfW2SSLyp9EczsnmHtRgO1fO1OQq76+gaK7UdC1TEIGqQ==
  dependencies:
    https-proxy-agent "^5.0.0"
    node-fetch "^2.6.7"
    progress "^2.0.3"
    proxy-from-env "^1.1.0"
    which "^2.0.2"

"@sentry/core@7.80.1":
  version "7.80.1"
  resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.80.1.tgz#ccb85e15495bf0c8b142ca1713408c64e38c9f4c"
  integrity sha512-3Yh+O9Q86MxwIuJFYtuSSoUCpdx99P1xDAqL0FIPTJ+ekaVMiUJq9NmyaNh9uN2myPSmxvEXW6q3z37zta9ZHg==
  dependencies:
    "@sentry/types" "7.80.1"
    "@sentry/utils" "7.80.1"

"@sentry/core@7.91.0":
  version "7.91.0"
  resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.91.0.tgz#229334d7f03dd5d90a17495e61ce4215ab730b2a"
  integrity sha512-tu+gYq4JrTdrR+YSh5IVHF0fJi/Pi9y0HZ5H9HnYy+UMcXIotxf6hIEaC6ZKGeLWkGXffz2gKpQLe/g6vy/lPA==
  dependencies:
    "@sentry/types" "7.91.0"
    "@sentry/utils" "7.91.0"

"@sentry/integrations@7.91.0", "@sentry/integrations@^7.91.0":
  version "7.91.0"
  resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.91.0.tgz#b0496c9e404783bc433b1d2464d8f9aa180ebc8e"
  integrity sha512-LGRfb+WfG3FaWHtDnJIhtupweat0imCQr2z/5SSbQKzqxHhtlaEU+9IExBmBdzq90n4lRBaVQHA3zGuU02uOhg==
  dependencies:
    "@sentry/core" "7.91.0"
    "@sentry/types" "7.91.0"
    "@sentry/utils" "7.91.0"
    localforage "^1.8.1"

"@sentry/node@7.91.0":
  version "7.91.0"
  resolved "https://registry.yarnpkg.com/@sentry/node/-/node-7.91.0.tgz#26bf13c3daf988f9725afd1a3cc38ba2ff90d62a"
  integrity sha512-hTIfSQxD7L+AKIqyjoq8CWBRkEQrrMZmA3GSZgPI5JFWBHgO0HBo5TH/8TU81oEJh6kqqHAl2ObMhmcnaFqlzg==
  dependencies:
    "@sentry-internal/tracing" "7.91.0"
    "@sentry/core" "7.91.0"
    "@sentry/types" "7.91.0"
    "@sentry/utils" "7.91.0"
    https-proxy-agent "^5.0.0"

"@sentry/node@^7.19.0":
  version "7.80.1"
  resolved "https://registry.yarnpkg.com/@sentry/node/-/node-7.80.1.tgz#ceca8c7b5e37cf1537747642eabef23145530ad4"
  integrity sha512-0NWfcZMlyQphKWsvyzfhGm2dCBk5DUPqOGW/vGx18G4tCCYtFcAIj/mCp/4XOEcZRPQgb9vkm+sidGD6DnwWlA==
  dependencies:
    "@sentry-internal/tracing" "7.80.1"
    "@sentry/core" "7.80.1"
    "@sentry/types" "7.80.1"
    "@sentry/utils" "7.80.1"
    https-proxy-agent "^5.0.0"

"@sentry/replay@7.91.0":
  version "7.91.0"
  resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.91.0.tgz#95077868aee3c3cc670affe13156434f858e1755"
  integrity sha512-XwbesnLLNtaVXKtDoyBB96GxJuhGi9zy3a662Ba/McmumCnkXrMQYpQPh08U7MgkTyDRgjDwm7PXDhiKpcb03g==
  dependencies:
    "@sentry-internal/tracing" "7.91.0"
    "@sentry/core" "7.91.0"
    "@sentry/types" "7.91.0"
    "@sentry/utils" "7.91.0"

"@sentry/svelte@7.91.0":
  version "7.91.0"
  resolved "https://registry.yarnpkg.com/@sentry/svelte/-/svelte-7.91.0.tgz#3d1f4c7bd0dc8ed6191a32fc6df81abbc814fbd7"
  integrity sha512-pdK97nm7FB4k9KJ+ZWos6uqiTEn00/EU2QGFG1r16QwKtDGnJBT7VBnA1PGPXh/fZfJ8L0AjAlwB6aUDurEujg==
  dependencies:
    "@sentry/browser" "7.91.0"
    "@sentry/types" "7.91.0"
    "@sentry/utils" "7.91.0"
    magic-string "^0.30.0"

"@sentry/sveltekit@^7.91.0":
  version "7.91.0"
  resolved "https://registry.yarnpkg.com/@sentry/sveltekit/-/sveltekit-7.91.0.tgz#f0d3f849d9765ba0020586c50e2dcea7de6f48a3"
  integrity sha512-DBTzuQCZVLpDcqEeS+v8z8L2mjUj75h08FJrzkYvbmemuHozKxOSxZuS3z3qmDEbR9XN9O3fW27PYOtzANBPKw==
  dependencies:
    "@sentry-internal/tracing" "7.91.0"
    "@sentry/core" "7.91.0"
    "@sentry/integrations" "7.91.0"
    "@sentry/node" "7.91.0"
    "@sentry/svelte" "7.91.0"
    "@sentry/types" "7.91.0"
    "@sentry/utils" "7.91.0"
    "@sentry/vite-plugin" "^0.6.1"
    magicast "0.2.8"
    sorcery "0.11.0"

"@sentry/tracing@^7.19.0":
  version "7.80.1"
  resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.80.1.tgz#2c85758ff45f70086f14eef136cacaf8ffabb230"
  integrity sha512-sFkcxCBtLNVa3EyeCafZqhJHZ714f2+ryPWTBckAmxAsON4yjh/YLs2X1FJ2n6Rnv16TP6gWGt4SnhFT03WStA==
  dependencies:
    "@sentry-internal/tracing" "7.80.1"

"@sentry/types@7.80.1":
  version "7.80.1"
  resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.80.1.tgz#dc720d6f2da0b510d586814451a04a2cdd2f4a9d"
  integrity sha512-CVu4uPVTOI3U9kYiOdA085R7jX5H1oVODbs9y+A8opJ0dtJTMueCXgZyE8oXQ0NjGVs6HEeaLkOuiV0mj8X3yw==

"@sentry/types@7.91.0":
  version "7.91.0"
  resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.91.0.tgz#5b68954e08986fecb0d4bef168df58eef62c32c7"
  integrity sha512-bcQnb7J3P3equbCUc+sPuHog2Y47yGD2sCkzmnZBjvBT0Z1B4f36fI/5WjyZhTjLSiOdg3F2otwvikbMjmBDew==

"@sentry/utils@7.80.1":
  version "7.80.1"
  resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.80.1.tgz#1c719f41b4d2c818363551fc40776a274b71efff"
  integrity sha512-bfFm2e/nEn+b9++QwjNEYCbS7EqmteT8uf0XUs7PljusSimIqqxDtK1pfD9zjynPgC8kW/fVBKv0pe2LufomeA==
  dependencies:
    "@sentry/types" "7.80.1"

"@sentry/utils@7.91.0":
  version "7.91.0"
  resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.91.0.tgz#3b1a94c053c885877908cd3e1365e3d23e21a73f"
  integrity sha512-fvxjrEbk6T6Otu++Ax9ntlQ0sGRiwSC179w68aC3u26Wr30FAIRKqHTCCdc2jyWk7Gd9uWRT/cq+g8NG/8BfSg==
  dependencies:
    "@sentry/types" "7.91.0"

"@sentry/vite-plugin@^0.6.1":
  version "0.6.1"
  resolved "https://registry.yarnpkg.com/@sentry/vite-plugin/-/vite-plugin-0.6.1.tgz#31eb744e8d87b1528eed8d41433647727a62e7c0"
  integrity sha512-qkvKaSOcNhNWcdxRXLSs+8cF3ey0XIRmEzTl8U7sTTcZwuOMHsJB+HsYij6aTGaqsKfP8w1ozVt9szBAiL4//w==
  dependencies:
    "@sentry/bundler-plugin-core" "0.6.1"

...

"@sveltejs/adapter-auto@^2.1.1":
  version "2.1.1"
  resolved "https://registry.yarnpkg.com/@sveltejs/adapter-auto/-/adapter-auto-2.1.1.tgz#e055c71bdb8d2923d63db089752675f70ab1a0f3"
  integrity sha512-nzi6x/7/3Axh5VKQ8Eed3pYxastxoa06Y/bFhWb7h3Nu+nGRVxKAy3+hBJgmPCwWScy8n0TsstZjSVKfyrIHkg==
  dependencies:
    import-meta-resolve "^4.0.0"

"@sveltejs/adapter-vercel@^3.0.3":
  version "3.0.3"
  resolved "https://registry.yarnpkg.com/@sveltejs/adapter-vercel/-/adapter-vercel-3.0.3.tgz#bbd5c0cd76aa2a2103f93d4e1d17d970ab11b09c"
  integrity sha512-0FQMjR6klW4627ewdclSr0lUe/DqiiyOaRTfgb5cXgNbVMsZMOA2fQ77TYQnJdvMfSEWe6y8uznV48XqKh9+vA==
  dependencies:
    "@vercel/nft" "^0.23.0"
    esbuild "^0.18.11"

"@sveltejs/kit@^1.27.4":
  version "1.27.6"
  resolved "https://registry.yarnpkg.com/@sveltejs/kit/-/kit-1.27.6.tgz#2feea84413205422887e01326d979edd9a982dff"
  integrity sha512-GsjTkMbKzXdbeRg0tk8S7HNShQ4879ftRr0ZHaZfjbig1xQwG57Bvcm9U9/mpLJtCapLbLWUnygKrgcLISLC8A==
  dependencies:
    "@sveltejs/vite-plugin-svelte" "^2.5.0"
    "@types/cookie" "^0.5.1"
    cookie "^0.5.0"
    devalue "^4.3.1"
    esm-env "^1.0.0"
    kleur "^4.1.5"
    magic-string "^0.30.0"
    mrmime "^1.0.1"
    sade "^1.8.1"
    set-cookie-parser "^2.6.0"
    sirv "^2.0.2"
    tiny-glob "^0.2.9"
    undici "~5.26.2"

"@sveltejs/vite-plugin-svelte-inspector@^1.0.4":
  version "1.0.4"
  resolved "https://registry.yarnpkg.com/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-1.0.4.tgz#c99fcb73aaa845a3e2c0563409aeb3ee0b863add"
  integrity sha512-zjiuZ3yydBtwpF3bj0kQNV0YXe+iKE545QGZVTaylW3eAzFr+pJ/cwK8lZEaRp4JtaJXhD5DyWAV4AxLh6DgaQ==
  dependencies:
    debug "^4.3.4"

"@sveltejs/vite-plugin-svelte@^2.5.0":
  version "2.5.2"
  resolved "https://registry.yarnpkg.com/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-2.5.2.tgz#de9e9cab3d9614407788702514bc57258a3cac77"
  integrity sha512-Dfy0Rbl+IctOVfJvWGxrX/3m6vxPLH8o0x+8FA5QEyMUQMo4kGOVIojjryU7YomBAexOTAuYf1RT7809yDziaA==
  dependencies:
    "@sveltejs/vite-plugin-svelte-inspector" "^1.0.4"
    debug "^4.3.4"
    deepmerge "^4.3.1"
    kleur "^4.1.5"
    magic-string "^0.30.3"
    svelte-hmr "^0.15.3"
    vitefu "^0.2.4"

...

"@vercel/build-utils@7.2.4":
  version "7.2.4"
  resolved "https://registry.yarnpkg.com/@vercel/build-utils/-/build-utils-7.2.4.tgz#3ca79b0db223ab754439cd4362454ac4b7297ed7"
  integrity sha512-AHnpT34gpTKG1iwZjWapxAF3Xc/8a/COLARVVvin6J9yM2ZTQyR7NihNCdQT9m3sSofVhB3lt03CAMXu8gioHg==

"@vercel/error-utils@2.0.2":
  version "2.0.2"
  resolved "https://registry.yarnpkg.com/@vercel/error-utils/-/error-utils-2.0.2.tgz#d75ccce100dbdfc9cb85700767b59d4257a91113"
  integrity sha512-Sj0LFafGpYr6pfCqrQ82X6ukRl5qpmVrHM/191kNYFqkkB9YkjlMAj6QcEsvCG259x4QZ7Tya++0AB85NDPbKQ==

"@vercel/fun@1.1.0":
  version "1.1.0"
  resolved "https://registry.yarnpkg.com/@vercel/fun/-/fun-1.1.0.tgz#5bac83585a736b6bfe4616017fe5f0a46562c3ba"
  integrity sha512-SpuPAo+MlAYMtcMcC0plx7Tv4Mp7SQhJJj1iIENlOnABL24kxHpL09XLQMGzZIzIW7upR8c3edwgfpRtp+dhVw==
  dependencies:
    "@tootallnate/once" "2.0.0"
    async-listen "1.2.0"
    debug "4.1.1"
    execa "3.2.0"
    fs-extra "8.1.0"
    generic-pool "3.4.2"
    micro "9.3.5-canary.3"
    ms "2.1.1"
    node-fetch "2.6.7"
    path-match "1.2.4"
    promisepipe "3.0.0"
    semver "7.3.5"
    stat-mode "0.3.0"
    stream-to-promise "2.2.0"
    tar "4.4.18"
    tree-kill "1.2.2"
    uid-promise "1.0.0"
    uuid "3.3.2"
    xdg-app-paths "5.1.0"
    yauzl-promise "2.1.3"

"@vercel/gatsby-plugin-vercel-analytics@1.0.11":
  version "1.0.11"
  resolved "https://registry.yarnpkg.com/@vercel/gatsby-plugin-vercel-analytics/-/gatsby-plugin-vercel-analytics-1.0.11.tgz#07e6a02665c340ad31ad9d9d3b0df00a30a32aed"
  integrity sha512-iTEA0vY6RBPuEzkwUTVzSHDATo1aF6bdLLspI68mQ/BTbi5UQEGjpjyzdKOVcSYApDtFU6M6vypZ1t4vIEnHvw==
  dependencies:
    web-vitals "0.2.4"

"@vercel/gatsby-plugin-vercel-builder@2.0.10":
  version "2.0.10"
  resolved "https://registry.yarnpkg.com/@vercel/gatsby-plugin-vercel-builder/-/gatsby-plugin-vercel-builder-2.0.10.tgz#fd5c9b6a00d998a736017fb16b5dc6782e27512a"
  integrity sha512-EA54c/7mcp2DftEMoTa2qfggaSzjGI8FCxkgaIxHm+O65Om+MSYCEeKkA1Kj++zoMfhyXoTYEDKnqk5AD3GeYw==
  dependencies:
    "@sinclair/typebox" "0.25.24"
    "@vercel/build-utils" "7.2.4"
    "@vercel/routing-utils" "3.1.0"
    esbuild "0.14.47"
    etag "1.8.1"
    fs-extra "11.1.0"

"@vercel/go@3.0.3":
  version "3.0.3"
  resolved "https://registry.yarnpkg.com/@vercel/go/-/go-3.0.3.tgz#38316e6570a258711af1afa514e174c32c541d6f"
  integrity sha512-XhrmpsACxNo64ojhscL//Mq+XEfm3VXlx/UIUcHzJJXdvFnz7DEzh1zs0AtdpVgZbYhPQ7rW3GIejaHrIJnN5w==

"@vercel/hydrogen@1.0.1":
  version "1.0.1"
  resolved "https://registry.yarnpkg.com/@vercel/hydrogen/-/hydrogen-1.0.1.tgz#e3edb8a6326e22020b8bfc76afae196e098df0cd"
  integrity sha512-4PYk4LeIWPTjGtgnxvB0Hdw7aqCau843/96K2xX3z9pa0Hn//pUnZBMz2jrs5MRseCm1Li1LdQAK3u8/vaUnVQ==
  dependencies:
    "@vercel/static-config" "3.0.0"
    ts-morph "12.0.0"

"@vercel/next@4.0.14":
  version "4.0.14"
  resolved "https://registry.yarnpkg.com/@vercel/next/-/next-4.0.14.tgz#55301c677ec6ad4f6d86ca3a6861981d1b377510"
  integrity sha512-29x93X278ElpbftrSgHvdY9OGVZkHurm3ST/WbdyE/AASEuqwOvShkpAoQl8idlFJFHPjd4c2v5xv1ZVyEb6sg==
  dependencies:
    "@vercel/nft" "0.24.2"

"@vercel/nft@0.24.2":
  version "0.24.2"
  resolved "https://registry.yarnpkg.com/@vercel/nft/-/nft-0.24.2.tgz#9b910ce52692a9a621f52740d896d4a2440d5865"
  integrity sha512-KhY3Ky/lCqE+fHpOXiKOLnXYJ49PZh1dyDSfVtZhmYtmica0NQgyO6kPOAGDNWqD9IOBx8hb65upxxjfnfa1JA==
  dependencies:
    "@mapbox/node-pre-gyp" "^1.0.5"
    "@rollup/pluginutils" "^4.0.0"
    acorn "^8.6.0"
    async-sema "^3.1.1"
    bindings "^1.4.0"
    estree-walker "2.0.2"
    glob "^7.1.3"
    graceful-fs "^4.2.9"
    micromatch "^4.0.2"
    node-gyp-build "^4.2.2"
    resolve-from "^5.0.0"

"@vercel/nft@^0.23.0":
  version "0.23.1"
  resolved "https://registry.yarnpkg.com/@vercel/nft/-/nft-0.23.1.tgz#f17c5f9d3f3a0178ea25eb7397a14618c00529bf"
  integrity sha512-NE0xSmGWVhgHF1OIoir71XAd0W0C1UE3nzFyhpFiMr3rVhetww7NvM1kc41trBsPG37Bh+dE5FYCTMzM/gBu0w==
  dependencies:
    "@mapbox/node-pre-gyp" "^1.0.5"
    "@rollup/pluginutils" "^4.0.0"
    acorn "^8.6.0"
    async-sema "^3.1.1"
    bindings "^1.4.0"
    estree-walker "2.0.2"
    glob "^7.1.3"
    graceful-fs "^4.2.9"
    micromatch "^4.0.2"
    node-gyp-build "^4.2.2"
    resolve-from "^5.0.0"

"@vercel/node@3.0.10":
  version "3.0.10"
  resolved "https://registry.yarnpkg.com/@vercel/node/-/node-3.0.10.tgz#3a381335399dca6d95b38310b49e83fa8f7012b8"
  integrity sha512-C/pwUToJjJeQcQss0xvEH1FERYhb9jlM8dIY51SaVf5tM9XtsuIQoe7yxoNbtdHhsiD2izwE/IoZdxNxw0FLvg==
  dependencies:
    "@edge-runtime/node-utils" "2.2.1"
    "@edge-runtime/primitives" "4.0.5"
    "@edge-runtime/vm" "3.1.7"
    "@types/node" "14.18.33"
    "@vercel/build-utils" "7.2.4"
    "@vercel/error-utils" "2.0.2"
    "@vercel/nft" "0.24.2"
    "@vercel/static-config" "3.0.0"
    async-listen "3.0.0"
    edge-runtime "2.5.7"
    esbuild "0.14.47"
    etag "1.8.1"
    exit-hook "2.2.1"
    node-fetch "2.6.9"
    path-to-regexp "6.2.1"
    ts-morph "12.0.0"
    ts-node "10.9.1"
    typescript "4.9.5"
    undici "5.26.5"

"@vercel/python@4.1.0":
  version "4.1.0"
  resolved "https://registry.yarnpkg.com/@vercel/python/-/python-4.1.0.tgz#657c948bd32bb92aed5301f7b41da012a3d8cd10"
  integrity sha512-EIQXK5zL6fce0Barh74gc7xyLtRyvgmLZDIVQ8yJLtFxPlPCRY3GXkdJ7Jdcw8Pd0uuVF0vIHatv18xSLbcwtg==

"@vercel/redwood@2.0.5":
  version "2.0.5"
  resolved "https://registry.yarnpkg.com/@vercel/redwood/-/redwood-2.0.5.tgz#ed55742a68c5a84ec65375169e2ad462f4d31b5a"
  integrity sha512-9iWTxfMkC7yNnwN2xxOdptiIDAgXe1V1fh3aw92MWt5PBRcFY9RqgIPF7Q3Qa7yzQFgpbHwCnSTqWO+HCEuFtw==
  dependencies:
    "@vercel/nft" "0.24.2"
    "@vercel/routing-utils" "3.1.0"
    semver "6.3.1"

"@vercel/remix-builder@2.0.11":
  version "2.0.11"
  resolved "https://registry.yarnpkg.com/@vercel/remix-builder/-/remix-builder-2.0.11.tgz#87aafffd71e8f86d3c2c400ba143a73a56f46cd7"
  integrity sha512-blp+PPXFZ4KWLHrh0PZfR9Er/yOQAzPJLbmvJtfJIBnes8SVmIWB89xl+P89HVruknK+FNvCotEFCU41DUjoWw==
  dependencies:
    "@vercel/nft" "0.24.2"
    "@vercel/static-config" "3.0.0"
    ts-morph "12.0.0"

"@vercel/routing-utils@3.1.0":
  version "3.1.0"
  resolved "https://registry.yarnpkg.com/@vercel/routing-utils/-/routing-utils-3.1.0.tgz#6a71903f4106006b2cb52add9d3b708b59acaaaf"
  integrity sha512-Ci5xTjVTJY/JLZXpCXpLehMft97i9fH34nu9PGav6DtwkVUF6TOPX86U0W0niQjMZ5n6/ZP0BwcJK2LOozKaGw==
  dependencies:
    path-to-regexp "6.1.0"
  optionalDependencies:
    ajv "^6.0.0"

"@vercel/ruby@2.0.2":
  version "2.0.2"
  resolved "https://registry.yarnpkg.com/@vercel/ruby/-/ruby-2.0.2.tgz#93d40e07087e625c90332cbf58bd40929fbcb292"
  integrity sha512-MqFynhtZ905L210DWAbgkiEQEK39LTtp9eL2Nm6PjzhjNzU6hV0UfK8Z24vU9CC6J4mrUTTZx396fH7XTYJWqg==

"@vercel/static-build@2.0.11":
  version "2.0.11"
  resolved "https://registry.yarnpkg.com/@vercel/static-build/-/static-build-2.0.11.tgz#f75b0c4fdc7dcf8f90e739352ed7c9b46c116cf0"
  integrity sha512-UYlzPf6ruL7/7Xu1GzvsXRaDH0Bb/xXGbOpOVpbdJLBdEojX3U/gjxCqYaLFrIk03lzmFbcs77uCn3GbOvBlsA==
  dependencies:
    "@vercel/gatsby-plugin-vercel-analytics" "1.0.11"
    "@vercel/gatsby-plugin-vercel-builder" "2.0.10"
    "@vercel/static-config" "3.0.0"
    ts-morph "12.0.0"

"@vercel/static-config@3.0.0":
  version "3.0.0"
  resolved "https://registry.yarnpkg.com/@vercel/static-config/-/static-config-3.0.0.tgz#2bd56aa08d1293f0982ca3a5923412550bf64bfe"
  integrity sha512-2qtvcBJ1bGY0dYGYh3iM7yGKkk971FujLEDXzuW5wcZsPr1GSEjO/w2iSr3qve6nDDtBImsGoDEnus5FI4+fIw==
  dependencies:
    ajv "8.6.3"
    json-schema-to-ts "1.6.4"
    ts-morph "12.0.0"

Let me know if that helps or, I'm happy to post more details about our setup

@Gipetto
Copy link

Gipetto commented Dec 27, 2023

@gwax Thank you for responding.

So, I had to nuke my package-lock.json file and pin a bunch of stuff. Having to actually depend on @sentry/tracing is a bit baffling.

   "dependencies": {
+    "@sentry/integrations": "^7.91.0",
+    "@sentry/sveltekit": "^7.91.0",
+    "@sentry/tracing": "^7.80.1",
     "luxon": "^3.4.4",
     "md5": "^2.3.0",
     "natural": "^6.10.4"
-  }
+  },
+  "overrides": {
+    "@sentry/browser": "7.80.1",
+    "@sentry/integration": "7.91.0",
+    "@sentry/node": "7.91.0",
+    "@sentry/svelte": "7.91.0",
+    "@sentry/sveltekit": "7.91.0",
+    "@sentry/cli": "2.22.2",
+    "@sentry/utils": "7.80.1",
+    "@sentry/tracing": "7.80.1"
+  },

All in all this works... but it feels super brittle.

@lforst
Copy link
Member

lforst commented Dec 28, 2023

@Gipetto these dependencies look very problematic. Make sure all dependencies except for the CLI are on the same version. Also @sentry/tracing is deprecated - I recommend removing it. Your're gonna run into problems down the line with this setup.

@Gipetto
Copy link

Gipetto commented Dec 28, 2023

:sigh:

So, it turns out that I'm likely an idiot. The part here where I had to nuke or manually edit my package-lock got me to go back and try from the beginning again.

  1. I ran the automated installer npx @sentry/wizard@latest -i sveltekit and installed
  2. Deployed and verified the error
  3. I then added the override for "@sentry/cli": "2.22.2" in my package.json
  4. Deleted the package-lock.json file and reinstalled
  5. Redeploying from here worked.

So the folks who have been using Sentry for a while likely still have older known good versions in their lock files. And there's probably more out there like me who didn't think through the correct way to pin a package in NPM or were just moving too fast.

@knd775
Copy link

knd775 commented Dec 28, 2023

We've pinged Vercel about this. I'll see if I can find a workaround for this this week.

Have you been able to reach them outside of that GitHub issue? They just renamed it to be specific to sharp, so they don't seem to be acknowledging that it affects other packages.

@lforst
Copy link
Member

lforst commented Dec 29, 2023

@knd775 I've pinged them on slack but I believe Vercel is on company holiday until the end of the year. I'd prefer if we keep communication about this in the public in any case (i.e. over at vercel/nft#371).

@lforst
Copy link
Member

lforst commented Jan 2, 2024

We've released a new version of the CLI 2.23.2 which includes a change that may solve the missing binary for Vercel deployments. The package will now include a post-install script that tries to manually download the binary when it cannot find the relevant optional dependency including the binary. This is very similar to what esbuild does for its binary.

Please try it out and let me know if it solved the issue for you.

@Patrick-Ullrich
Copy link

Patrick-Ullrich commented Jan 2, 2024

@lforst can confirm, updating to "@sentry/sveltekit": "^7.91.0", enabled us to deploy to vercel again.

EDIT:
Since there might be difference between npm / yarn / pnpm: We are using npm 9.x

@knd775
Copy link

knd775 commented Jan 2, 2024

It does work, but we're also getting these errors. Something is still using the old CLI version
image

@akqira
Copy link

akqira commented Jan 2, 2024

struggled a bit even after upgrading to @sentry/sveltekit": "^7.91.0" but didn't pay attention to my yarn.lock
So file removed, yarn install and now all is good.
Thank you guys for efforts

@alexbjorlig
Copy link

We've released a new version of the CLI 2.23.2

In our package.json we only have "@sentry/sveltekit": "^7.91.0",.

When I inspect the package-lock.json the @sentry/cli is still version 2.23.1 - is there a way I can pin/upgrade to the latest version?

(we still can't deploy on vercel)

@Gipetto
Copy link

Gipetto commented Jan 3, 2024

@alexbjorlig

In your package.json add:

"overrides": {
  "@sentry/cli": "2.22.2"
}

Then either:

a. delete your package-lock.json. If your app and dependencies are typically ok with being brought up to latest versions then this is an OK route. My app is still in beta and has a short dependency list, so this was easiest.
b. manually update your package-lock.json file to create matching entries for @sentry/cli. If you have an older app that has accumulated a specific dependency list and you have issues upgrading packages sometimes, this might be the better avenue.

Then re-run npm install (or yarn, or whatever you're using)

@benmccann
Copy link

I believe that setting runtime: 'edge' in adapter-vercel would avoid this issue by avoiding invoking @vercel/nft

https://kit.svelte.dev/docs/adapter-vercel#deployment-configuration

@knd775
Copy link

knd775 commented Jan 3, 2024

I believe that setting runtime: 'edge' in adapter-vercel would avoid this issue by avoiding invoking @vercel/nft

https://kit.svelte.dev/docs/adapter-vercel#deployment-configuration

I left this comment on the vercel issue, but thought it was worth repeating here:

Sentry doesn't currently work with vercel edge functions because of another vercel issue related to source maps.

@lforst
Copy link
Member

lforst commented Jan 4, 2024

This issue should be fixed with the newest version of the @sentry/cli package. Let us know if this is not the case.

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

No branches or pull requests