You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use embeddings/jina in a browser, but when compiling, I get the error "parse" is not exported. The reason is that url.parse() has been deprecated. instead, we need to use the WHATWG URL API.
System Info
node v20.12.0
vite v5.4.11
The text was updated successfully, but these errors were encountered:
Hey @axuj! 👋 I'm here to help you with any bugs, questions, or contributions. Let's squash those bugs together!
To resolve the error "parse" is not exported when using embeddings/jina in a browser with LangChain.js, you should replace the deprecated url.parse() with the WHATWG URL API. Here's how you can modify the isLocal function:
This change uses the URL constructor from the WHATWG URL API, which is the recommended approach for parsing URLs in modern JavaScript environments [1].
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
node_modules/.pnpm/@langchain+community@0.3.16_@browserbasehq+sdk@2.0.0_@browserbasehq[email protected]_@playwrig_kt6rnhndxajs2oz6yl6vmflni4/node_modules/@langchain/community/dist/embeddings/jina.js (2:9): "parse" is not exported by "vite-browser-external:url", imported by "node_modules/.pnpm/@langchain[email protected]@[email protected]@[email protected]_@playwrig_kt6rnhndxajs2oz6yl6vmflni4/node_modules/@langchain/community/dist/embeddings/jina.js".
Description
I'm trying to use embeddings/jina in a browser, but when compiling, I get the error
"parse" is not exported
. The reason is that url.parse() has been deprecated. instead, we need to use the WHATWG URL API.System Info
node v20.12.0
vite v5.4.11
The text was updated successfully, but these errors were encountered: