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

[JS] [Next.js] Webpack Console Warnings for googleCloud plugin #935

Open
MichaelDoyle opened this issue Sep 19, 2024 · 0 comments
Open

[JS] [Next.js] Webpack Console Warnings for googleCloud plugin #935

MichaelDoyle opened this issue Sep 19, 2024 · 0 comments
Assignees
Labels
bug Something isn't working js

Comments

@MichaelDoyle
Copy link
Member

Describe the bug

Init a new next.js project using the genkit CLI. Then add the googleCloud plugin and enable telemetry.

 ⚠ ./node_modules/@opentelemetry/instrumentation-winston/build/src/instrumentation.js
Module not found: Can't resolve '@opentelemetry/winston-transport' in '/Users/michaeldoyle/repos/thirdparty/nextjs/node_modules/@opentelemetry/instrumentation-winston/build/src'

Import trace for requested module:
./node_modules/@opentelemetry/instrumentation-winston/build/src/instrumentation.js
./node_modules/@opentelemetry/instrumentation-winston/build/src/index.js
./node_modules/@genkit-ai/google-cloud/lib/gcpOpenTelemetry.js
./node_modules/@genkit-ai/google-cloud/lib/index.mjs
./src/app/genkit.ts
./src/app/flow1/page.tsx

./node_modules/@opentelemetry/sdk-node/build/src/TracerProviderWithEnvExporter.js
Module not found: Can't resolve '@opentelemetry/exporter-jaeger' in '/Users/michaeldoyle/repos/thirdparty/nextjs/node_modules/@opentelemetry/sdk-node/build/src'

Similar to #928, the workaround is to install and/or externalize the dependencies.

/** @type {import('next').NextConfig} */
const nextConfig = {
  experimental: {
    serverComponentsExternalPackages: [
      "@opentelemetry/sdk-node",
      "@opentelemetry/winston-transport",
    ],
  },
};

export default nextConfig;

Runtime (please complete the following information):

Node: 20.17.0
Genkit: 0.5.13
Next: 14.2.12

** Node version**

v20.17.0

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working js
Projects
Status: No status
Development

No branches or pull requests

1 participant