Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Conversation

@rishi-raj-jain
Copy link

@rishi-raj-jain rishi-raj-jain commented Nov 28, 2024

Changes

After the build happens with the cloudflare adapter, one of my applications threw error as attached. But the preview ran fine using wrangler. I then noticed then it was failing to read from a file that did not exist in the dist/_worker.js directory. I think this happens because the Astro cleanup happened but it had the older resultant map.

image

Testing

Docs

@changeset-bot
Copy link

changeset-bot bot commented Nov 28, 2024

🦋 Changeset detected

Latest commit: 0ade1ce

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
@astrojs/cloudflare Patch
@test/astro-cloudflare-astro-dev-platform Patch
@test/astro-cloudflare-astro-env Patch
@test/astro-cloudflare-compile-image-service Patch
@test/astro-cloudflare-external-image-service Patch
@test/astro-cloudflare-wasm Patch
@test/astro-cloudflare-no-output Patch
@test/astro-cloudflare-routes-json Patch
@test/astro-cloudflare-with-solid-js Patch
@test/astro-cloudflare-wrangler-preview-platform Patch

Not sure what this means? Click here to learn what changesets are.

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

@rishi-raj-jain
Copy link
Author

So I tried to get more context as to why this is occuring, it seems to read a .js file that does not exist while from my adapter's code analysis, it should only have read the .mjs file.
image

Copy link
Member

@alexanderniebuhr alexanderniebuhr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks okay to me, however I'm not sure if it doesn't hide the real issue.. It should never try to cleanup files, which don't exist anymore.. I'm concerned that we hide something here, which we should investigate in more detail.

@rishi-raj-jain
Copy link
Author

I see, I agree with that. There's something that's why the file is looking for a .js file while the function is intended for a .mjs file. Not sure how can I create a minimal reproducible though, I am working on a large project with Astro and that's where I started seeing this.

@alexanderniebuhr alexanderniebuhr self-assigned this Dec 13, 2024
@ematipico
Copy link
Member

Hi, we moved the cloudflare adapter in a new repository: https://github.com/withastro/astro/tree/main/packages/integrations/cloudflare

We will achieve this repository soon, so if you wish to land this PR, you'll have to create a new one.

@ematipico ematipico closed this Feb 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants