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

adapter-cloudflare-workers build fails in Windows (could not resolve) #3211

Closed
hyunbinseo opened this issue Jan 5, 2022 · 0 comments · Fixed by #3212
Closed

adapter-cloudflare-workers build fails in Windows (could not resolve) #3211

hyunbinseo opened this issue Jan 5, 2022 · 0 comments · Fixed by #3212

Comments

@hyunbinseo
Copy link
Contributor

hyunbinseo commented Jan 5, 2022

Describe the bug

adapter-cloudflare-workers build fails in Windows.

@sveltejs/adapter-cloudflare-workers@1.0.0-next.27
@sveltejs/kit@1.0.0-next.216

Related to #3163 - applying the identical fix of #3200 solves the problem.

import { relative } from 'path/posix';

Reproduction

https://github.com/hyunbinseo/issue-adapter-cloudflare-workers

Clone the repository, install packages, and run the build script.

Logs

> Using @sveltejs/adapter-cloudflare-workers
 > .svelte-kit/cloudflare-workers-tmp/entry.js:1:20: error: Could not resolve "..outputserver/app.js" (mark it as external to exclude it from the bundle)
    1 │ import { App } from '..\output\server/app.js';~~~~~~~~~~~~~~~~~~~~~~~~~

 > .svelte-kit/cloudflare-workers-tmp/manifest.js:8:16: error: Could not resolve "..outputserver/nodes/0.js" (mark it as external to exclude it from the bundle, or add ".catch()" to handle the failure at run-time)
    8        () => import('..\output\server/nodes/0.js'),
      ╵                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 > .svelte-kit/cloudflare-workers-tmp/manifest.js:9:16: error: Could not resolve "..outputserver/nodes/1.js" (mark it as external to exclude it from the bundle, or add ".catch()" to handle the failure at run-time)
    9        () => import('..\output\server/nodes/1.js'),
      ╵                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 > .svelte-kit/cloudflare-workers-tmp/manifest.js:10:16: error: Could not resolve "..outputserver/nodes/2.js" (mark it as external to exclude it from the bundle, or add ".catch()" to handle the failure at run-time)
    10        () => import('..\output\server/nodes/2.js')
       ╵                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

> Build failed with 4 errors:
.svelte-kit/cloudflare-workers-tmp/entry.js:1:20: error: Could not resolve "..outputserver/app.js" (mark it as external to exclude it from the bundle)
.svelte-kit/cloudflare-workers-tmp/manifest.js:8:16: error: Could not resolve "..outputserver/nodes/0.js" (mark it as external to exclude it from the bundle, or add ".catch()" to handle the failure at run-time)
.svelte-kit/cloudflare-workers-tmp/manifest.js:9:16: error: Could not resolve "..outputserver/nodes/1.js" (mark it as external to exclude it from the bundle, or add ".catch()" to handle the failure at run-time)
.svelte-kit/cloudflare-workers-tmp/manifest.js:10:16: error: Could not resolve "..outputserver/nodes/2.js" (mark it as external to exclude it from the bundle, or add ".catch()" to handle the failure at run-time)
Error: Build failed with 4 errors:
.svelte-kit/cloudflare-workers-tmp/entry.js:1:20: error: Could not resolve "..outputserver/app.js" (mark it as external to exclude it from the bundle)
.svelte-kit/cloudflare-workers-tmp/manifest.js:8:16: error: Could not resolve "..outputserver/nodes/0.js" (mark it as external to exclude it from the bundle, or add ".catch()" to handle the failure at run-time)
.svelte-kit/cloudflare-workers-tmp/manifest.js:9:16: error: Could not resolve "..outputserver/nodes/1.js" (mark it as external to exclude it from the bundle, or add ".catch()" to handle the failure at run-time)
.svelte-kit/cloudflare-workers-tmp/manifest.js:10:16: error: Could not resolve "..outputserver/nodes/2.js" (mark it as external to exclude it from the bundle, or add ".catch()" to handle the failure at run-time)
    at failureErrorWithLog (issue-adapter-cloudflare-workers\node_modules\esbuild\lib\main.js:1493:15)
    at issue-adapter-cloudflare-workers\node_modules\esbuild\lib\main.js:1151:28
    at runOnEndCallbacks (issue-adapter-cloudflare-workers\node_modules\esbuild\lib\main.js:1069:65)
    at buildResponseToResult (issue-adapter-cloudflare-workers\node_modules\esbuild\lib\main.js:1149:7)
    at issue-adapter-cloudflare-workers\node_modules\esbuild\lib\main.js:1258:14
    at issue-adapter-cloudflare-workers\node_modules\esbuild\lib\main.js:629:9
    at handleIncomingPacket (issue-adapter-cloudflare-workers\node_modules\esbuild\lib\main.js:726:9)
    at Socket.readFromStdout (issue-adapter-cloudflare-workers\node_modules\esbuild\lib\main.js:596:7)
    at Socket.emit (node:events:390:28)
    at addChunk (node:internal/streams/readable:315:12)

System Info

System:
- OS: Windows 10 10.0.19044
- CPU: (8) x64 AMD Ryzen 7 4700U with Radeon Graphics
- Memory: 2.96 GB / 15.33 GB

Binaries:
- Node: 16.13.0 - C:\Program Files\nodejs\node.EXE
- npm: 8.3.0 - C:\Program Files\nodejs\npm.CMD

Browsers:
- Edge: Spartan (44.19041.1266.0), Chromium (96.0.1054.62)
- Internet Explorer: 11.0.19041.1202

npmPackages:
- @sveltejs/adapter-cloudflare-workers: 1.0.0-next.27 => 1.0.0-next.27
- @sveltejs/kit: 1.0.0-next.216 => 1.0.0-next.216
- svelte: ^3.44.0 => 3.44.3

Severity

blocking an upgrade

Additional Information

No response

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 a pull request may close this issue.

1 participant