I am trying to run forge tunnel
but the bundling fails due to an external library I am using.
The code which is causing the issue,
import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
The error message is,
Error: Bundling failed: Module not found: Error: Can't resolve 'js-tiktoken/lite' in '/app/node_modules/langchain/dist/util'
Did you mean 'lite.js'?
BREAKING CHANGE: The request 'js-tiktoken/lite' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
Is there a way I can make modifications to the bundler that is behind the forge cli
or use a custom bundler of my own?
Any help or insights would be really helpful.
Thanks