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: Fails to start dev pages if .d.ts generated by wasmpack is included #3953

Closed
lucasavila00 opened this issue Sep 15, 2023 · 1 comment
Labels
bug Something that isn't working pages Relating to Pages

Comments

@lucasavila00
Copy link

Which Cloudflare product(s) does this pertain to?

Pages

What version(s) of the tool(s) are you using?

3.8.0 [wrangler]

What version of Node are you using?

v18.16.0

What operating system are you using?

Linux

Describe the Bug

I'm building a pages project and using functions.

If I include this d.ts generated by wasmpack, wrangler dev does not start:

/* tslint:disable */
/* eslint-disable */
export const memory: WebAssembly.Memory;
export function compare_schemas(a: number, b: number, c: number, d: number, e: number): void;
export function init(a: number): void;
export function __wbindgen_add_to_stack_pointer(a: number): number;
export function __wbindgen_malloc(a: number, b: number): number;
export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number;
export function __wbindgen_free(a: number, b: number, c: number): void;
Compiling worker to "/tmp/functionsWorker-0.030211841906682135.mjs"...
✘ [ERROR] The constant "memory" must be initialized

    functions/pkg/index_bg.wasm.d.ts:3:13:
      3 │ export const memory: WebAssembly.Memory;
        ╵              ~~~~~~


✘ [ERROR] The constant "memory" must be initialized

    functions/pkg/index_bg.wasm.d.ts:3:13:
      3 │ export const memory: WebAssembly.Memory;
        ╵              ~~~~~~


✘ [ERROR] Build failed with 1 error:

  functions/pkg/index_bg.wasm.d.ts:3:13: ERROR: The constant "memory" must be initialized

deleting this file makes everything work, including the wasm file execution etc.

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

No response

@lucasavila00 lucasavila00 added the bug Something that isn't working label Sep 15, 2023
@admah admah added the pages Relating to Pages label Oct 4, 2023
@lrapoport-cf
Copy link
Contributor

hi @lucasavila00 ! thanks for flagging this. in an effort to remove stale issues so we can have better signal on current friction points, we’re closing out issues that have not been updated within the last 6 months. if this is still a problem, please feel free to open a new issue referencing this one. please be sure to include an updated summary and any additional context and we will review. thank you!

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

No branches or pull requests

3 participants