Closed hozaifa4you closed 7 months ago
π€
Hello @hozaifa4you! π
I'm Dosu, a friendly bot here to pitch in while we wait for a human maintainer. I can help troubleshoot bugs, answer your questions, and even guide you on becoming a contributor. Let's work together to resolve this issue, shall we? π
From the error message you provided, it seems like the issue is originating from the Next.js server. The error TypeError: s is not a function
is typically thrown when a function is expected but not provided. This could be due to a variety of reasons, such as a package not being properly installed or a conflict between packages.
Given that the error occurs when you install the officeparser
package, it's possible that there might be a conflict between this package and another package in your project, or that the officeparser
package is not compatible with your current Node.js version.
Here are a few steps you can take to troubleshoot this issue:
Check Node.js and officeparser
compatibility: Ensure that your Node.js version is compatible with the officeparser
package. You can check this by looking at the officeparser
package documentation or its package.json
file.
Reinstall the officeparser
package: Uninstall the officeparser
package using npm uninstall officeparser
, then reinstall it using npm install officeparser
. This can help if the package was not properly installed the first time.
Check for package conflicts: If the issue persists, try creating a new project and only install the officeparser
package. If the package works in this new project, it's likely that there's a conflict with another package in your original project.
Create a minimal reproducible example: If you're still experiencing the issue, try to create a minimal reproducible example. This involves creating a small project that only includes the code necessary to reproduce the issue. This can help you identify whether the issue is with the officeparser
package itself, or with the way it's being used in your project.
If none of these steps resolve your issue, please provide more information about how you're using the officeparser
package in your project, as well as the full error message you're seeing in your terminal. This will help me better understand the issue and provide a more accurate solution.
As for the 404 error from tRPC, it's hard to determine the cause without more information. It could be that the server route doesn't exist, or that there's an issue with the server itself. Please provide more details about how you're using tRPC in your project, and any error messages you're seeing related to tRPC.
I hope this helps! If you have any other questions, feel free to ask.
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a π if this is helpful and π if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
It may be node only π’ we will update docs accordingly
It may be node only π’ we will update docs accordingly
But I used it only in NextJs APIs.
Same problem with me, all my next js API routes are getting invalid after installing officeparser. Do you found any solution for this?
I don't think it's supported outside of Node envs - what if you remove export const runtime = "edge";
?
Hi, @hozaifa4you! I'm helping the langchainjs team manage their backlog and am marking this issue as stale.
It looks like you raised an issue regarding the installation of "officeparser" causing tRPC APIs to stop working, with a "TypeError: s is not a function" error message. There were responses from me providing troubleshooting steps and a suggestion to check for package conflicts, as well as a comment from @jacoblee93 indicating that "officeparser" may only be supported in Node environments. Another user, @DeadmanAbir, also reported encountering the same issue with their Next.js API routes after installing "officeparser."
Could you please confirm if this issue is still relevant to the latest version of the langchainjs repository? If it is, please let the langchainjs team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or the issue will be automatically closed in 7 days.
Thank you for your understanding and cooperation!
There seems to be an issue β with loading the
langchain
document and theofficeparser
package.Everything is running smoothly with my tRPC APIs, except for one issue I encountered while attempting to load a PowerPoint file using the
langchain
document loader. To fix the problem, I installedofficeparser
, but this caused all my tRPC APIs to stop working. Removing 'officeparser' resolved the issue and my tRPC APIs worked without any problems. However, whenofficeparser
was installed, I received a 404 error message from tRPC.