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

chore: Debugging CF deployments #439

Merged
merged 8 commits into from
Apr 3, 2024
Merged

Conversation

AdrianGonz97
Copy link
Collaborator

@AdrianGonz97 AdrianGonz97 commented Apr 3, 2024

I'll be documenting this frustrating issue here:

While migrating the docs to Cloudflare (from Vercel) using https://github.com/AdrianGonz97/refined-cf-pages-action for the deployment, we encountered a rather puzzling error that stopped the workflow in its tracks:

SHELLAC COMMAND FAILED!
Executing: npx wrangler@3 pages deploy "./.svelte-kit/cloudflare" --project-name="bits-ui" --branch="huntabyte-chore/fix-this-once-and-for-all" in /home/runner/work/bits-ui/bits-ui/sites/docs

STDOUT:



STDERR:

sh: 1: wrangler: not found
npm notice 
npm notice New minor version of npm available! 10.2.4 -> 10.5.0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.5.0>
npm notice Run `npm install -g npm@10.5.0` to update!
npm notice 


EXIT WHEN NOT EXPECTED

This error didn't make much sense since npx should just download the script and execute it immediately.

After some time debugging and comparing this project to the other projects we've previously been successful setting up CF with, I discovered the source of the issue coming from @sveltejs/adapter-cloudflare, specifically version 4.2.0. This version introduced wrangler as a dependency. For some reason, npx doesn't play nice with this and just errors out.

The solution is to install wrangler locally as a devDependency.

Copy link

changeset-bot bot commented Apr 3, 2024

⚠️ No Changeset found

Latest commit: 1c9ace7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Apr 3, 2024

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
bits-ui ✅ Ready (View Log) Visit Preview 1c9ace7

@github-actions github-actions bot requested a deployment to Preview April 3, 2024 03:54 Abandoned
@github-actions github-actions bot requested a deployment to Preview April 3, 2024 03:54 Abandoned
@github-actions github-actions bot requested a deployment to Preview April 3, 2024 03:57 Abandoned
@github-actions github-actions bot requested a deployment to Preview April 3, 2024 03:57 Abandoned
@github-actions github-actions bot requested a deployment to Preview April 3, 2024 04:00 Abandoned
@github-actions github-actions bot requested a deployment to Preview April 3, 2024 04:00 Abandoned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant