Skip to content

Issue with source map in v0.2.37 when running with Vite #414

Closed
@felladrin

Description

@felladrin

When running the project with Vite, it's throwing this error:
(It doesn't prevent Vite from running, it's just annoying)

  VITE v5.2.11  ready in 257 ms

  ➜  Local:   http://localhost:7860/
  ➜  Network: http://172.19.0.2:7860/
✘ [ERROR] Expected "," in source map but found "MLC_DUMMY_REQUIRE_VAR"

    node_modules/@mlc-ai/web-llm/lib/index.js.map:1:212952:
      1 │ ...st performanceNode = "MLC_DUMMY_REQUIRE_VAR";\r\n            ret...
        │                          ~~~~~~~~~~~~~~~~~~~~~
        ╵                          ,

  The source map "node_modules/@mlc-ai/web-llm/lib/index.js.map" was referenced by the file "node_modules/@mlc-ai/web-llm/lib/index.js" here:

    node_modules/@mlc-ai/web-llm/lib/index.js:8190:21:
      8190 │ //# sourceMappingURL=index.js.map
           ╵                      ~~~~~~~~~~~~
image

Temporary solution: remove the //# sourceMappingURL=index.js.map line from @mlc-ai/web-llm/lib/index.js before compiling and Vite won't throw any errors.


Extra info: The v0.2.35 didn't have this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions