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

[BUG] Windows Build Failing: Could not resolve open-nextserver-functionsdefaultcache.cjs #204

Open
thomas-desmond opened this issue Dec 23, 2024 · 1 comment
Labels
bug Something isn't working triage

Comments

@thomas-desmond
Copy link

Describe the bug

When attempting to deploy the firelabs-net/workers-next template and having made no changes to the template, the npm run deploy fails. Specifically the wrangler deploy step fails.

This is happening on a Windows machine in standard PowerShell terminal as well as WSL Ubuntu and Debian.

✘ [ERROR] Build failed with 1 error:

  ✘ [ERROR] Could not resolve
  "C:Users\tdesmondProjects\tempempty-hall-5379.open-nextserver-functionsdefaultcache.cjs"

      .open-next/server-functions/default/handler.mjs:30791:39:
        30791 │ ...= require('C:\Users\tdesmond\Projects\temp\empty-hall-5379\....
              ╵              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    You can mark the path
  "C:Users\tdesmondProjects\tempempty-hall-5379.open-nextserver-functionsdefaultcache.cjs" as
  external to exclude it from the bundle, which will remove this error. You can also surround this
  "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.

Steps to reproduce

  1. On a Windows machine create new Next.js project based on the 0.3 build npm create cloudflare@latest -- --template https://github.com/flarelabs-net/workers-next
  2. Attempt to deploy the application npm run deploy

Expected behavior

I'm expecting npm run deploy to complete without errors and deploy my application to Workers Assets.

@opennextjs/cloudflare version

0.3

Wrangler version

3.99.0

next info output

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 32206
  Available CPU cores: 22
Binaries:
  Node: 20.16.0
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.2.5 // An outdated version detected (latest is 15.1.2), upgrade is highly recommended!
  eslint-config-next: 14.2.5
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.7.2
Next.js Config:
  output: N/A
 ⚠ An outdated version detected (latest is 15.1.2), upgrade is highly recommended!
   Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
   Read more - https://nextjs.org/docs/messages/opening-an-issue

Additional context

No response

@dario-piotrowicz
Copy link
Contributor

I wonder if we can fully support windows in the short term 😕

Since OpenNext is not fully compatible with Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

2 participants