Skip to content

Next example doesn't work unless source is built #140

@narangkay

Description

@narangkay

The next example only seems to work when the source is built locally, and not when it's installed from npm.

Weirdly enough, if I install the source locally and then switch to using the prebuilt npm package, it works :/

Trial 1: Using prebuilt npm package only

  1. Don't build the web-llm repo from source
  2. Set the dependency in package,json to the prebuilt package
...
    "@mlc-ai/web-llm": "^0.2.2",
...
  1. install and run
npm install
npm run dev
  1. Run fails

Trial 2: Using prebuilt npm package after locally installing web-llm

  1. Build the web-llm repo from source
  2. Set the dependency in package,json to the prebuilt package
...
    "@mlc-ai/web-llm": "^0.2.2",
...
  1. install and run
npm install
npm run dev
  1. Run succeeds

Trial 3: Building from source

  1. Build the web-llm repo from source
  2. Set the dependency in package,json to the local package
...
    "@mlc-ai/web-llm": "../..",
...
  1. install and run
npm install
npm run dev
  1. Run succeeds

I'm a bit flummoxed as to why 1 doesn't work but 2 and 3 work. Specially 2 is surprising to me.

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