Giter VIP home page Giter VIP logo

Comments (7)

nmschulte avatar nmschulte commented on May 30, 2024

I believe this is the same/related issue I was running into:
https://groups.google.com/d/msg/cesium-dev/TPSOorUDU2Y/VJv3SOktAAAJ

I am currently updating this project to use Webpack 4 and Cesium 1.46 to reproduce and diagnose the issue. Does that forum post identify a solution?

from cesium-webpack-example.

nmschulte avatar nmschulte commented on May 30, 2024

I can no longer reproduce my issue with the latest versions of webpack (4.1.24.12.0) and various loaders (file-loader [0.11.21.1.11], url-loader [0.5.91.0.1]).

No matter if wasm-loader is in my "loader stack" (module loading rules; using oneOf w/ wasm-loader just before file-loader catch-all), this is what Webpack outputs

WARNING in ./node_modules/cesium/Source/ThirdParty/draco_decoder.wasm
Module parse failed: magic header not detected
You may need an appropriate loader to handle this file type.
Error: magic header not detected
    at new CompileError (/app/node_modules/@webassemblyjs/helper-api-error/lib/index.js:40:109)
    at parseModuleHeader (/app/node_modules/@webassemblyjs/wasm-parser/lib/decoder.js:288:13)
    at Object.decode (/app/node_modules/@webassemblyjs/wasm-parser/lib/decoder.js:1503:3)
    at decode (/app/node_modules/@webassemblyjs/wasm-parser/lib/index.js:234:21)
    at WebAssemblyParser.parse (/app/node_modules/webpack/lib/wasm/WebAssemblyParser.js:74:19)
    at doBuild.err (/app/node_modules/webpack/lib/NormalModule.js:462:32)
    at runLoaders (/app/node_modules/webpack/lib/NormalModule.js:344:12)
    at /app/node_modules/loader-runner/lib/LoaderRunner.js:370:3
    at iterateNormalLoaders (/app/node_modules/loader-runner/lib/LoaderRunner.js:211:10)
    at iterateNormalLoaders (/app/node_modules/loader-runner/lib/LoaderRunner.js:218:10)
    at /app/node_modules/loader-runner/lib/LoaderRunner.js:233:3
    at runSyncOrAsync (/app/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
    at iterateNormalLoaders (/app/node_modules/loader-runner/lib/LoaderRunner.js:229:2)
    at Array.<anonymous> (/app/node_modules/loader-runner/lib/LoaderRunner.js:202:4)
    at Storage.finished (/app/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:43:16)
    at provider (/app/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:79:9)
 @ ./node_modules/cesium/Source/ThirdParty sync ^.\/.*$
 @ ./node_modules/cesium/Source/ThirdParty/xss.js
 @ ./node_modules/cesium/Source/Core/Credit.js
 @ ./node_modules/cesium/Source/Core/IonResource.js
 @ ./node_modules/cesium/Source/Core/createWorldTerrain.js
 @ ./src/index.js
 @ multi ./scripts/config/polyfills.js ./src/index.js

My application seems to run fine even with this warning. It is not using Draco, except unless the Ion provided terrain is using Draco.

Upgrading as I did required that I provide webpack with more heap space (node --max-old-space), and things take a bit longer to build, but it does work, even without wasm-loader.

from cesium-webpack-example.

tkazik avatar tkazik commented on May 30, 2024

@nmschulte Would you mind sharing your webpack.config.js? I am currently getting the following error:

failed_to_load_model

Thank you!

from cesium-webpack-example.

nmschulte avatar nmschulte commented on May 30, 2024

@nmschulte Would you mind sharing your webpack.config.js?

@tkazik I can share a portion if you know what you're interested in.

from cesium-webpack-example.

Cronopaul avatar Cronopaul commented on May 30, 2024

Hallo, I downloaded the cesium-webpack-example and I have the following error:

cesium.js:14947 GET http://localhost:8080/ThirdParty/draco_decoder.wasm 404 (Not Found)

I can share a portion if you know what you're interested in.

Can you please share the part with the wasm loader?

from cesium-webpack-example.

nmschulte avatar nmschulte commented on May 30, 2024

Can you please share the part with the wasm loader?

@Cronopaul, I mitigated/resolved my issue by using a newer version of Webpack; Switching from Webpack v4.2.0 to Webpack v4.12.0 led to my comment here: #10 (comment)

To be clear, there is no wasm-loader in my Webpack config (webpack.config.js), I'm simply letting Webpack/file-loader handle these as they like.

from cesium-webpack-example.

Cronopaul avatar Cronopaul commented on May 30, 2024

Thanks for your reply. I'm using Webpack v4.30.0.

from cesium-webpack-example.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.