๐ BUG: โ [ERROR] Could not resolve "@cloudflare/pages-plugin-sentry"
See original GitHub issueWhat version of Wrangler
are you using?
2.1.6
What operating system are you using?
Windows (Git Bash/MINGW)
Describe the Bug
Summary
I am unable to resolve any packages in Cloudflare workers despite them being listed on https://workers.cloudflare.com/works and working locally through wrangler.
I followed the official guide to integrate Sentry as middleware.
Repo/branch
https://github.com/aensley/liturgy-day/tree/add-sentry-2
Source
Build Error
09:39:43.463 | Cloning repository...
-- | --
09:39:44.397 | From https://github.com/aensley/liturgy-day
09:39:44.397 | * branch 12f431856ec80533f29ffa5bc08320ad6dd7d464 -> FETCH_HEAD
09:39:44.397 | ย
09:39:44.443 | HEAD is now at 12f4318 add wrangler?
09:39:44.443 | ย
09:39:44.551 | ย
09:39:44.573 | Success: Finished cloning repository files
09:39:45.069 | No build command specified. Skipping build step.
09:39:45.559 | ๐ง 'wrangler pages <command>' is a beta command. Please report any issues to https://github.com/cloudflare/wrangler2/issues/new/choose
09:39:45.625 | โ [ERROR] Could not resolve "@cloudflare/pages-plugin-sentry"
09:39:45.625 | ย
09:39:45.625 | ../../../buildhome/repo/functions/_middleware.ts:1:25:
09:39:45.625 | 1 โ import sentryPlugin from '@cloudflare/pages-plugin-sentry'
09:39:45.626 | โต ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
09:39:45.626 | ย
09:39:45.626 | You can mark the path "@cloudflare/pages-plugin-sentry" as external to exclude it from the bundle, which will remove this error.
09:39:45.627 | ย
09:39:45.630 | 1 error(s) and 0 warning(s) when compiling Worker.
09:39:45.631 | ย
09:39:45.718 | [31mโ [41;31m[[41;97mERROR[41;31m][0m [1mBuild failed with 1 error:[0m
09:39:45.718 | ย
09:39:45.718 | ../../../buildhome/repo/functions/_middleware.ts:1:25: ERROR: Could not resolve "@cloudflare/pages-plugin-sentry"
09:39:45.718 | ย
09:39:45.718 | ย
09:39:45.718 | [32mIf you think this is a bug then please create an issue at https://github.com/cloudflare/wrangler2/issues/new/choose[0m
09:39:45.727 | Failed building Pages Functions from /functions.
09:39:46.537 | Failed: an internal error occurred
Local output (successful)
me@my-computer MINGW64 ~/Workspaces/liturgy-day (add-sentry-2)
$ npx wrangler pages dev src --binding SENTRY_DSN="https://xxxxxxxxxxxxx@xxxxxxx.ingest.sentry.io/xxxxxxxxx" --binding ENVIRONMENT="local"
๐ง 'wrangler pages <command>' is a beta command. Please report any issues to https://github.com/cloudflare/wrangler2/issues/new/choose
Compiling worker to "C:\Users\me\AppData\Local\Temp\functionsWorker-0.9120506640895183.js"...
Compiled Worker successfully.
โฒ [WARNING] Passing --inspect is unnecessary, now you can always connect to devtools.
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ [b] open a browser, [d] open Devtools, [c] clear console, [x] to exit โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Debugger listening on ws://0.0.0.0:9229/972d75ea-2273-4625-8023-a5817c6a81ab
For help, see: https://nodejs.org/en/docs/inspector
[pages:wrn] Parsed 2 valid header rules.
[pages:wrn] Service bindings are experimental. There may be breaking changes in the future.
[pages:inf] Worker reloaded! (195.16KiB)
[pages:inf] Listening on 0.0.0.0:8788
[pages:inf] Updated `Request.cf` object cache!
GET /api/day/2022-09-26 200 OK (19.75ms)
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Known issues ยท Cloudflare Pages docs
Here are some known bugs and issues with Cloudflare Pages: ... Balancer does not work with *.pages.dev projects; an Error 1000: DNS pointsย ......
Read more >Sentry Pages Plugin - Cloudflare Docs
The Sentry Pages Plugin captures and logs all exceptions which occur below it in the execution chain of your Pages Functions. It is...
Read more >Configuring Custom Pages (Error and Challenge)
Learn how to customize Cloudflare's default error and challenge pages to better fit your brand and messaging. Overview Step 1: Create a...
Read more >Cloudflare Pages error "Failed: an internal error occurred"
I'm using Cloudflare Pages and receiving this generic error during the โDeploying to Cloudflare's global networkโ step: Failed: an internal ย ...
Read more >Pages Plugins - Cloudflare Docs
The full power of Functions is available to Plugins, including middleware, parameterized routes, and static assets. For example, a Pages Plugin ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was having the same issue with
@cloudflare/kv-asset-handler
, I have temporarily resolved this by adding a precommand to install@cloudflare/kv-asset-handler
, is there a better approach? Thanks.Hi @nevikashah, any updates?