-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Error : Cannot get final name for export 'getRuntime' of ./node_modules/openai/_shims/auto/runtime-node.mjs #5161
Comments
The error you're encountering with const nextConfig = {
webpack: (config, { isServer }) => {
if (!isServer) {
config.resolve.fullySpecified = false;
}
config.module.rules.push({
test: /node_modules\/langchain/,
resolve: {
fullySpecified: false,
},
});
return config;
},
}; This configuration change tells Webpack to be more flexible with module resolution for the Additionally, ensure all dependencies are compatible and up-to-date, and consider customizing the Next.js Webpack configuration to handle or transpile Node.js modules more effectively, especially if If these steps do not resolve the issue, providing more details about your setup and the steps leading to the error could help in diagnosing and solving the problem.
|
@dosu /** @type {import('next').NextConfig} */
const nextConfig = {
transpilePackages: ['html-to-text'],
webpack: (config ) => {
config.externals = [...config.externals, "hnswlib-node","closevector-hnswlib-node","langchain","openai","@langchain", "@langchain/community","@langchain/groq"];
return config;
},
};
export default nextConfig; and now my openai error is gone somehow
|
To address the new error with
Ensure your Langchain and Next.js versions are compatible and consult Langchain's documentation or support for any additional configuration steps required for Next.js and Vercel. Additionally, a similar issue was resolved in a previous pull request which enabled support for various environments including Next.js. Reviewing this might provide further insights. Let me know if this helps or if you encounter any more issues!
|
hello @dosu, I tried to run |
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
The text was updated successfully, but these errors were encountered: