Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module error #75

Open
thdoan opened this issue Oct 17, 2023 · 1 comment
Open

Cannot find module error #75

thdoan opened this issue Oct 17, 2023 · 1 comment

Comments

@thdoan
Copy link

thdoan commented Oct 17, 2023

I'm using the sample code for Cloudflare Workers and got these errors in VS Code:

Cannot find module 'tiktoken/lite/init' or its corresponding type declarations.
Cannot find module './node_modules/tiktoken/lite/tiktoken_bg.wasm' or its corresponding type declarations.
Cannot find module 'tiktoken/encoders/cl100k_base.json' or its corresponding type declarations.

Code:

import { init, Tiktoken } from 'tiktoken/lite/init';
import wasm from './node_modules/tiktoken/lite/tiktoken_bg.wasm';
import model from 'tiktoken/encoders/cl100k_base.json';

I double-checked that ./node_modules/tiktoken does exist. Is there a step I'm missing?

@ajayvignesh01
Copy link

did u end up figuring this out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants