piffie
piffie
CDCloudflare Developers
Created by piffie on 10/5/2024 in #pages-help
workers deployment v2 produces an [nuxt] instance unavailable, works when build is compiled locally
I have a weird issue with the pages deployment. When i compile localhost, and then use wrangler pages deploy, everything is fine. When i use either the v2 github pull function (autodeploy) or a github action (cloudflare/[email protected]) then the Nuxt server constantly produces a [nuxt] instance unavailable i.e.: https://1615b361.app-hub.pages.dev/ (deployed via local worker, no issues) https://ff5d1bbe.app-hub.pages.dev/ ( deployed via github action) https://d88b02f2.mc2-mono.pages.dev/ (deployed via pages v2 hook) what can i do to debug it? i already figured out that if i turn nuxt SSR off, all works fine, but then my seo is total crap - so not an option.
2 replies
CDCloudflare Developers
Created by piffie on 7/2/2024 in #pages-help
pages-action deployment fails since 7 hrs on github-actions
Since 7 hours, our github pages-action fails to deploy on our environments - error is very cryptic and seems internal to wrangler. ▲ [WARNING] wrangler pages publish is deprecated and will be removed in the next major version. Please use wrangler pages deploy instead, which accepts exactly the same arguments. ▲ [WARNING] Warning: Your working directory is a git repo and has uncommitted changes To silence this warning, pass in --commit-dirty=true ✘ [ERROR] ENOENT: no such file or directory, scandir '/home/runner/work/.mono/.mono/apps/alpha-nuxt/dist' If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose ? Would you like to report this error to Cloudflare? 🤖 Using fallback value in non-interactive context: no 🪵 Logs were written to "/home/runner/.config/.wrangler/logs/wrangler-2024-07-02_12-31-01_630.log" npm notice npm notice New minor version of npm available! 10.7.0 -> 10.8.1 npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.1 npm notice To update run: npm install -g [email protected] npm notice EXIT WHEN NOT EXPECTED SHELLAC COMMAND FAILED! Executing: npx wrangler@3 pages publish "apps/alpha-nuxt/dist" --project-name="alpha" --branch="staging" in /home/runner/work/.mono/.mono STDOUT: If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose ? Would you like to report this error to Cloudflare? 🤖 Using fallback value in non-interactive context: no STDERR: ▲ [WARNING] wrangler pages publish is deprecated and will be removed in the next major version. Please use wrangler pages deploy instead, which accepts exactly the same arguments. ▲ [WARNING] Warning: Your working directory is a git repo and has uncommitted changes To silence this warning, pass in --commit-dirty=true ✘ [ERROR] ENOENT: no such file or directory, scandir '/home/runner/work/.mono/.mono/apps/alpha-nuxt/dist' 🪵 Logs were written to "/home/runner/.config/.wrangler/logs/wrangler-2024-07-02_12-31-01_630.log" npm notice npm notice New minor version of npm available! 10.7.0 -> 10.8.1 npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.1 npm notice To update run: npm install -g [email protected] npm notice node:internal/process/promises:279 triggerUncaughtException(err, true /* fromPromise */); ^ [UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".] { code: 'ERR_UNHANDLED_REJECTION' } Our yml config: - name: Publish Alpha to Pages uses: cloudflare/[email protected] with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} projectName: "alpha" # e.g. 'my-project' directory: "apps/alpha-nuxt/dist" # e.g. 'dist' gitHubToken: ${{ secrets.GH_TOKEN }} wranglerVersion: '3' branch: staging
6 replies
CDCloudflare Developers
Created by piffie on 3/2/2024 in #pages-help
deployment works locally, but not via github actions
I have a deployment that perfectly works if i run locally wrangler deploy, but failed without any error message on github actions deploy. After tons of tries, figured out that there is a hint - if you want to use wrangler3 during deploy you have to specify it. that then solved it. wranglerVersion: '3' would be really helpful to either write that much bigger, or actually make the latest one the default.
2 replies
CDCloudflare Developers
Created by piffie on 3/2/2024 in #workers-help
wrangler google action not working
I have an issue with wrangler-action@v3 it seems. i have a monorepo and deploy several services. All run fine, except one, where it seems it cannot install wrangler (and its funny, as this works fine for the other services in the same github action. ##[debug]Evaluating condition for step: '🚀 Publish analytics' ##[debug]Evaluating: success() ##[debug]Evaluating success: ##[debug]=> true ##[debug]Result: true ##[debug]Starting: 🚀 Publish analytics ##[debug]Loading inputs ##[debug]Evaluating: secrets.CLOUDFLARE_API_TOKEN ##[debug]Evaluating Index: ##[debug]..Evaluating secrets: ##[debug]..=> Object ##[debug]..Evaluating String: ##[debug]..=> 'CLOUDFLARE_API_TOKEN' ##[debug]=> '' ##[debug]Result: '' ##[debug]Loading env Run cloudflare/wrangler-action@v3 with: apiToken: workingDirectory: apps/analytics command: deploy wranglerVersion: 3.30.1 quiet: false env: TURBO_TOKEN: TURBO_API: TURBO_REMOTE_CACHE_SIGNATURE_KEY: TURBO_TEAM: *** TURBO_REMOTE_ONLY: true PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin HUSKY: 0 ::group::📥 Installing Wrangler 📥 Installing Wrangler /opt/hostedtoolcache/node/20.11.1/x64/bin/npm i [email protected] npm ERR! Cannot set properties of null (setting 'peer') npm ERR! A complete log of this run can be found in: /home/runner/.npm/_logs/2024-03-02T20_07_59_833Z-debug-0.log ::endgroup:: Error: The process '/opt/hostedtoolcache/node/20.11.1/x64/bin/npm' failed with exit code 1 Error: 🚨 Action failed ##[debug]Node Action run completed with exit code 1 ##[debug]Finishing: 🚀 Publish analytics
2 replies
CDCloudflare Developers
Created by piffie on 2/3/2024 in #workers-help
getBindingsProxy Mess - leads to build errors
Love the idea of that method - makes my code really nicer. Now - to use it i need to: import { getBindingsProxy } from "wrangler"; this for sure results in an "cannot find package wrangler" so i move wrangler from dev dependencies to dependencies. after restart, it than complains that it wants to load the full wrangler inside of wranger - resulting in nodejs errors like: X [ERROR] Could not resolve "fs/promises"

../../node_modules/.pnpm/[email protected]/node_modules/miniflare/dist/src/index.js:2506:30:
2506 │ var import_promises = require("fs/promises"); ╵ ~~~ The package "fs/promises" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error. X [ERROR] Could not resolve "worker_threads"

../../node_modules/.pnpm/[email protected]/node_modules/miniflare/dist/src/index.js:5159:36:
5159 │ var import_worker_threads = require("worker_threads"); ╵
~~~~~~ The package "worker_threads" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error. as for sure, these APIs are not available when loaded inside of wrangler. So, how to solve this?
18 replies
CDCloudflare Developers
Created by piffie on 2/3/2024 in #general-help
99% HTTP530 errors
Hi, the statistics (in Datadog) show me, that 99% of the requests are returned as 530 errors - somehow i cannot find any details on what it exactly is. Could be totally OK (maybe its just bots) but i just want to understand if i maybe missed something. Any help where i can find more infos what the exact code is (i.e. the 1xxx code they return as well)
1 replies