mlc-ai / mlc-ai/tokenizers-cpp
Fail to import in Node.js
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 512
- Forks
- 132
- PR merge metrics
- No merged PRs in 30d
Description
It seems that the npm package can not be imported in a Node.js:
import {Tokenizer} from "@mlc-ai/web-tokenizers";
import {Tokenizer} from "@mlc-ai/web-tokenizers";
^^^^^^^^^
SyntaxError: The requested module '@mlc-ai/web-tokenizers' does not provide an export named 'Tokenizer'
import Tokenizer from "@mlc-ai/web-tokenizers";
import Tokenizer from "@mlc-ai/web-tokenizers";
^^^^^^^^^
SyntaxError: The requested module '@mlc-ai/web-tokenizers' does not provide an export named 'default'
I have no experience with rollup so I can't quite see where went wrong in packaging.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the two import failures shown in the issue with the @mlc-ai/web-tokenizers package, then inspect its Rollup packaging and module entry configuration. Done means the package exposes a documented import that works in Node.js without either export error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, rollup
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100