-
Notifications
You must be signed in to change notification settings - Fork 6
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
Issue using in next.js 13 #69
Comments
@razznblue Did you get it solved? I am trying to use it with next.js 14 and got a module not found error. |
Ya bro I never heard back from the team so I stopped caring |
There is a tutorial on how to use Clarifai with Next.js here. You could look at it on how to correctly import the library. |
I'm personally not that familiar with next.js, but it looks like you're trying to use You could try to do some fallbacks with webpack, but I doubt it will work, especially part with managing and passing secrets. I'd recommend moving using this code on backend only. |
@AGI-CEO Have you required grpc library as listed in Dynamic Approach section? https://github.com/Clarifai/clarifai-nodejs-grpc?tab=readme-ov-file#the-dynamic-approach const { ClarifaiStub, grpc } = require("clarifai-nodejs-grpc");
Also, try to reinstall packages, maybe something was missing / not fetched:
If you notice any error during packages installation, please let us know. |
I have thoroughly reviewed the |
I tried your recommendation but still no joy. After rm and reinstalling dependencies, I still get this error when testing API both via my frontend UI and thunderclient (postman-equivalent vs code extension)-
I even tried running an npm install within the clarifai-nodejs-grpc node-module directory since after inspection there is no node-module within the directory which did create the missing requirements, but that resulted in different errors and I assessed I was already looking into the topic more than would be conducive to my ultimate goals. Above demonstrates my use of dynamic approach. I have not tried static approach and I am changing my tech stack to a Python FastAPI backend instead to make use of Clarifai's python SDK. My preference is to build with nextjs since it is undoubtedly the best way to build an AI SaaS from a DX perspective (SSR, payments, subscription, authentication, marketing automation, vercel AI SDK, react UI), so I would still like to return to a non-python backend eventually. |
Hello!
I am encountering an issue when importing this library into my next.js application.
This occurs when I load the page on which I am importing clarifai-nodejs-grpc
I am using
next.js v13.5.4
andclarifai-nodejs-grpc v9.9.6
Any advice on what I could try to get this working would be much appreciated. Thank you!
The text was updated successfully, but these errors were encountered: