Magick
Magick
CDCloudflare Developers
Created by Magick on 11/16/2024 in #pages-help
Usage Error: Unsupported package manager specification ([email protected],bun,1.1.30)
Hello I'm trying to deploy a nextjs application. I've connected it to my github repo, but when it tries to build, it fails with the following:
2024-11-16T06:04:33.142507Z Cloning repository...
2024-11-16T06:04:41.108393Z From https://github.com/magick93/typebot.io
2024-11-16T06:04:41.109114Z * branch 36595468f7ffe05f4f8503018f88b159d4f92963 -> FETCH_HEAD
...
2024-11-16T06:04:42.201922Z Success: Finished cloning repository files
2024-11-16T06:04:43.680218Z Checking for configuration in a wrangler.toml configuration file (BETA)
2024-11-16T06:04:43.68086Z
2024-11-16T06:04:43.78878Z No wrangler.toml file found. Continuing.
...
2024-11-16T06:04:47.129702Z Bun v1.1.30 is installed successfully!
2024-11-16T06:04:47.592707Z Installing project dependencies: yarn
2024-11-16T06:04:47.914507Z Usage Error: Unsupported package manager specification ([email protected],bun,1.1.30)
2024-11-16T06:04:47.914759Z
2024-11-16T06:04:47.914885Z $ yarn ...
2024-11-16T06:04:47.921663Z Error: Exit with error code: 1
2024-11-16T06:04:47.921839Z at ChildProcess.<anonymous> (/snapshot/dist/run-build.js)
2024-11-16T06:04:47.921962Z at Object.onceWrapper (node:events:652:26)
2024-11-16T06:04:47.922068Z at ChildProcess.emit (node:events:537:28)
2024-11-16T06:04:47.922146Z at ChildProcess._handle.onexit (node:internal/child_process:291:12)
2024-11-16T06:04:47.931192Z Failed: build command exited with code: 1
2024-11-16T06:04:48.615077Z Failed: error occurred while running build command
2024-11-16T06:04:33.142507Z Cloning repository...
2024-11-16T06:04:41.108393Z From https://github.com/magick93/typebot.io
2024-11-16T06:04:41.109114Z * branch 36595468f7ffe05f4f8503018f88b159d4f92963 -> FETCH_HEAD
...
2024-11-16T06:04:42.201922Z Success: Finished cloning repository files
2024-11-16T06:04:43.680218Z Checking for configuration in a wrangler.toml configuration file (BETA)
2024-11-16T06:04:43.68086Z
2024-11-16T06:04:43.78878Z No wrangler.toml file found. Continuing.
...
2024-11-16T06:04:47.129702Z Bun v1.1.30 is installed successfully!
2024-11-16T06:04:47.592707Z Installing project dependencies: yarn
2024-11-16T06:04:47.914507Z Usage Error: Unsupported package manager specification ([email protected],bun,1.1.30)
2024-11-16T06:04:47.914759Z
2024-11-16T06:04:47.914885Z $ yarn ...
2024-11-16T06:04:47.921663Z Error: Exit with error code: 1
2024-11-16T06:04:47.921839Z at ChildProcess.<anonymous> (/snapshot/dist/run-build.js)
2024-11-16T06:04:47.921962Z at Object.onceWrapper (node:events:652:26)
2024-11-16T06:04:47.922068Z at ChildProcess.emit (node:events:537:28)
2024-11-16T06:04:47.922146Z at ChildProcess._handle.onexit (node:internal/child_process:291:12)
2024-11-16T06:04:47.931192Z Failed: build command exited with code: 1
2024-11-16T06:04:48.615077Z Failed: error occurred while running build command
I'm not sure why its trying to use yarn as this is not used in the project. There was a yarn lock file in the repo, but even after removing this the same error as above occurs. Any help is greatly appreciated.
1 replies
CDCloudflare Developers
Created by Magick on 9/29/2024 in #workers-help
Uncaught ReferenceError: Buffer is not defined
Hello I'm getting the following error:
✘ [ERROR] service core:user:industries: Uncaught ReferenceError: Buffer is not defined

at null.<anonymous> (index.js:3223:11
✘ [ERROR] service core:user:industries: Uncaught ReferenceError: Buffer is not defined

at null.<anonymous> (index.js:3223:11
I have added compatibility_flags = [ "nodejs_compat" ] and am importing node:buffer.
import { Hono } from 'hono'
import { Buffer } from 'node:buffer';
globalThis.Buffer = Buffer; //✘ [ERROR] service core:user:industries: Uncaught ReferenceError: Buffer is not defined
const { Index, Document, Worker } = require("flexsearch");
import { parse } from 'csv-parse/sync'
import { Hono } from 'hono'
import { Buffer } from 'node:buffer';
globalThis.Buffer = Buffer; //✘ [ERROR] service core:user:industries: Uncaught ReferenceError: Buffer is not defined
const { Index, Document, Worker } = require("flexsearch");
import { parse } from 'csv-parse/sync'
Does anyone have any other suggestions? Thanks and kind regards
2 replies
CDCloudflare Developers
Created by Magick on 7/18/2024 in #pages-help
workers.api.error.script_not_found [code: 8000068]
Hello I have two Next js web applications, that, after some experimenting, builds and deploys. However nothing displays in the browser. And when tailing the logs in both, I see the same:
workers.api.error.script_not_found [code: 8000068]
workers.api.error.script_not_found [code: 8000068]
Does anyone know how to resolve this?
16 replies
CDCloudflare Developers
Created by Magick on 7/18/2024 in #pages-help
Failed: build output directory contains links to files that can't be accessed
Hello I'm trying to build and deploy a Next.js application on CF Pages, but, the build ultimately fails with:
08:04:22.211 Tasks: 6 successful, 6 total
08:04:22.211 Cached: 0 cached, 6 total
08:04:22.211 Time: 3m38.054s
08:04:22.211
08:04:24.798 Finished
08:04:24.799 Note: No functions dir at /functions found. Skipping.
08:04:24.799 Validating asset output directory
08:04:26.637 Failed: build output directory contains links to files that can't be accessed
08:04:22.211 Tasks: 6 successful, 6 total
08:04:22.211 Cached: 0 cached, 6 total
08:04:22.211 Time: 3m38.054s
08:04:22.211
08:04:24.798 Finished
08:04:24.799 Note: No functions dir at /functions found. Skipping.
08:04:24.799 Validating asset output directory
08:04:26.637 Failed: build output directory contains links to files that can't be accessed
I did find a github issue about this - https://github.com/cloudflare/workers-sdk/issues/2674 - which is closed, but there isnt any clear solution to this. Can anyone help?
1 replies
CDCloudflare Developers
Created by Magick on 7/14/2024 in #pages-help
Bun and Environment Variables - how?
I'm trying to read environment variables and everything I try seems to fail. Here are some of the attempts and issues. - Using import { env } from "bun"; results in ERROR: Could not resolve "bun". - const test_env = process.env.TEST_ENV; results in Uncaught ReferenceError: process is not defined
17 replies
CDCloudflare Developers
Created by Magick on 7/12/2024 in #pages-help
Error: Dynamic require of "node:buffer" is not supported
I re-deployed my sveltekit pages project. I hadnt added any new dependencies. I also havent upgraded any existing dependencies. However, I'm now getting an error 500. And when I tail the logs I see:
Error: Dynamic require of "node:buffer" is not supported
Error: Dynamic require of "node:buffer" is not supported
Any idea how I resolve this?
2 replies
CDCloudflare Developers
Created by Magick on 7/2/2024 in #pages-help
Pages, Sveltekit and Environment variables
Hello, I'm trying to use Cloudflare pages to deloy our web application. However I'm getting errors in the build for each env var, public or private.
Error: Module '"$env/static/public"' has no exported member 'PUBLIC_SUPABASE_URL'.
Error: Module '"$env/static/public"' has no exported member 'PUBLIC_SUPABASE_URL'.
I've tried adding these in both the wrangler.tom and in the settings > environment variables tab. Neither has any effect on the build errors. My build command, from the package.json file is "build": "npx svelte-kit sync && npx svelte-check && vite build", Any help is appreciated. ---- It seems many others are having the same problem and no one has found a solution.
7 replies