Skip to content

parseVec could not cast the value #16030

@ivnsch

Description

@ivnsch

Bevy version

0.14.2

If you cannot get Bevy to build or run on your machine, please include:

  • the Rust version you're using (you can get this by running cargo --version)
    1.82.0

  • Relevant system information
    Mac m1, macOS 14.6.1

What you did

Building WASM with (see instructions in readme):
https://github.com/ivnsch/mol/tree/wasm_debug_removing_things

Use it in a next app:
https://github.com/ivnsch/mol_next_app_tmp
(start with npm run dev, navigate to http://locahost:3000)

What went wrong

Error:
⨯ ./wasm/mol_bg.wasm
Module parse failed: Internal failure: parseVec could not cast the value
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
Error: Internal failure: parseVec could not cast the value
Import trace for requested module:

relevant info

This seems to be a larger issue about reference types not being supported by webpack
webpack/webpack#15566

Not sure what bevy can do about it, but opening as it's still impacted by it.

Known workarounds

This workaround from the issue above seems to work

[profile.release]
strip = true

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-BugAn unexpected or incorrect behaviorO-WebSpecific to web (WASM) buildsP-Compile-FailureA failure to compile Bevy appsS-Needs-InvestigationThis issue requires detective work to figure out what's going wrong

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions