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?
I'm using the sample code for Cloudflare Workers and got these errors in VS Code:
Code:
I double-checked that
./node_modules/tiktoken
does exist. Is there a step I'm missing?