Skip to content
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

Minify Issue | Nextjs Webpack | Server Only #965

Open
jordanparker6 opened this issue Mar 6, 2025 · 0 comments
Open

Minify Issue | Nextjs Webpack | Server Only #965

jordanparker6 opened this issue Mar 6, 2025 · 0 comments

Comments

@jordanparker6
Copy link

Unable to build a NextJS app with langgraph.js without setting the following on the server only build.

If minimize=true, the build compiles and then throws TypeError: Cannot set properties of undefined (setting 'SHA224')

next.config.js

  webpack: (config, { isServer }) => {
    config.externalsPresets = { node: true }
    config.ignoreWarnings = [{ module: /opentelemetry/ }];
    config.externals = [...(config.externals || []), 'canvas', 'domino', 'danfojs-node'];

    if (!isServer) {
      config.resolve.fallback = {
        ...config.resolve.fallback,
        googleapis: false,
        'google-auth-library': false,
      };
      config.resolve.alias = {
        ...config.resolve.alias,
        '@slack/web-api': false,
      };
    } else {
      config.optimization.minimize = false;
    }

This was a related issue.
#180

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant