Skip to content

Conversation

@EvanDarwin
Copy link

The source of this PR was from build failures I was getting related to linked files in dist/cloudflare/:

✗ Build failed in 816ms
[vike-cloudflare] EEXIST: file already exists, symlink '../../../client/category/reviews/index.html' -> '/Users/evan/Documents/Code/project/dist/cloudflare/category/reviews/index.html'
    at symlink (node:internal/fs/promises:1001:10)
    at symlinkOrCopy (file:///Users/evan/Documents/Code/project/node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected]__c2be31428ae5fe96f66c824fc430c401/node_modules/vike-cloudflare/dist/index.js:183:5)
... {
  errno: -17,
  code: 'PLUGIN_ERROR',
  syscall: 'symlink',
  path: '../../../client/category/reviews/index.html',
  dest: '/Users/evan/Documents/Code/project/dist/cloudflare/category/reviews/index.html',
  pluginCode: 'EEXIST',
  plugin: 'vike-cloudflare',
  hook: 'writeBundle'
}

Attempting to create a linked file at a path that already exists results in an error in *NIX environments.

This patch narrows the error case to only non-symlinked files (let's not unlink entire files and directories we're not sure about) so the user can intervene, while allowing the standard build process to succeed.

renovate bot and others added 27 commits February 4, 2025 13:43
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
)

* fix: make `vike-cloudflare` a real Vike extension (vikejs#37)

BREAKING CHANGE: update vike to `>=0.4.219`

* lint

* fix: fix hattip build

* chore: vike@^0.4.224

* update

* update peer dep

* minor refactor

* pnpm dedupe

* re-run CI

* re-run CI

* re-run CI

* re-run CI

* re-run CI

---------

Co-authored-by: Joël Charles <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
BREAKING CHANGE: Use `[email protected]` or above.
BREAKING CHANGE: `vike-cloudflare` is now a Vike extension. Check [migrating from `0.1.x` to `0.2.x`](https://vike.dev/migration/vike-cloudflare)
@EvanDarwin
Copy link
Author

I realize now that this patch may only affect the 0.1.x branch, as the build process seems to have changed in 0.2.x (fixing the underlying issue as well).

However, I'd still appreciate getting this merged as it affects the version of vike-cloudflare that's shipped in the templates on vike.dev, even if it affects projects running outside Windows / CI environments, and also using SSG.

@magne4000 magne4000 changed the base branch from main to v0.1 June 10, 2025 08:41
@magne4000
Copy link
Member

@EvanDarwin I created a v0.1 for this purpose. Can you rebase your fix on this branch?

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.

3 participants