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 #789
Comments
How are you compiling your project? eg, are you using turborepo or webpack? |
I'm also facing a similar kind of issue in Ubuntu
Node Version - v18.12.1 |
are you using nextjs or webapck? I got it to work in webpack/nextjs by changing the webpack/next config |
Hey @jiveshkalra how did you do that? I'm facing the same issue. I'm using next.js with monorepo. |
Never mind @jiveshkalra. For those looking for an answer try the following: // next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["<PACKAGE_NAME>"],
},
};
module.exports = nextConfig; |
for me it was an issue with webpack not exporting the package files properly // next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack: (config ) => {
config.externals = [...config.externals, "hnswlib-node","closevector-hnswlib-node" ,"openai"];
return config;
},
};
export default nextConfig; |
Confirm this is a Node library issue and not an underlying OpenAI API issue
Describe the bug
I am trying to use Langchain + NextJs for hosting my chatbot , and it works fine in the development server ,
But when I try to compile my code to host on the vercel server, I am getting this error
To Reproduce
npm run build
Code snippets
OS
Windows
Node version
Node v20.9.0
Library version
OpenAI v4.38.2
The text was updated successfully, but these errors were encountered: