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

Critical dependency: the request of a dependency is an expression #2

Open
juliusmarminge opened this issue Jan 25, 2024 · 4 comments
Open

Comments

@juliusmarminge
Copy link
Contributor

When used in Next.js

CleanShot 2024-01-25 at 14 12 08

@davguij
Copy link

davguij commented Jan 31, 2024

Just found the same issue when trying to add trpcTracingMiddleware to the procedures as suggested in the docs.

@Ankcorn
Copy link
Contributor

Ankcorn commented Feb 1, 2024

Hey, this is a known issue.

open-telemetry/opentelemetry-js#4173

If you add this to your next.config.js it will suppress the webpack warning

    webpack: (
        config,
        { buildId, dev, isServer, defaultLoaders, nextRuntime, webpack }
    ) => {
        if (isServer) {
            config.ignoreWarnings = [
                { module: /opentelemetry/, },
            ]
        }
        return config
    },

@davguij
Copy link

davguij commented Feb 2, 2024

@Ankcorn That solved it for me, thanks for the hint!

@manimeskartehrani
Copy link

@Ankcorn Thanks for the hint, however it doesn't work for me. What I found and help me out is to change the type in NextJs.
In the .next/package.json I changed the type from "CommonJs" to "module" and it solves all the error.

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

4 participants