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 Warning #200

Open
mcrovero opened this issue Jun 27, 2024 · 2 comments
Open

Critical Dependency Warning #200

mcrovero opened this issue Jun 27, 2024 · 2 comments

Comments

@mcrovero
Copy link

mcrovero commented Jun 27, 2024

When using next version 14.2.4 and @hatchet-dev/typescript-sdk version ^0.10.0, the console is flooded with a critical dependency warning:

Critical dependency: the request of a dependency is an expression

Environment:

OS: [e.g., macOS 12.6]
Node.js version: 19.3.0
Next.js version: 14.2.4
@hatchet-dev/typescript-sdk version: 0.10.0
Additional context
The warning traces back to the following import paths:

../../node_modules/.pnpm/@[email protected]/node_modules/@hatchet-dev/typescript-sdk/util/thread-helper.js
../../node_modules/.pnpm/@[email protected]/node_modules/@hatchet-dev/typescript-sdk/clients/dispatcher/heartbeat/heartbeat-controller.js
../../node_modules/.pnpm/@[email protected]/node_modules/@hatchet-dev/typescript-sdk/clients/dispatcher/action-listener.js
../../node_modules/.pnpm/@[email protected]/node_modules/@hatchet-dev/typescript-sdk/clients/dispatcher/dispatcher-client.js
../../node_modules/.pnpm/@[email protected]/node_modules/@hatchet-dev/typescript-sdk/clients/hatchet-client/hatchet-client.js
../../node_modules/.pnpm/@[email protected]/node_modules/@hatchet-dev/typescript-sdk/index.js
./services/hatchet-client.ts
./app/api/import/route.ts

While the error is just a warning, it significantly clutters the console output, making it harder to debug other issues.

Don't know if it may help but using turbopack the error crashes the app.

@abelanger5
Copy link
Contributor

Hey @mcrovero, we'll look into this. What is exported out of ./services/hatchet-client.ts?

@mcrovero
Copy link
Author

mcrovero commented Jun 27, 2024

import Hatchet from "@hatchet-dev/typescript-sdk";

let hatchetClient: Hatchet | undefined;
export const getHatchetClient = () => {
  if (!hatchetClient) {
    hatchetClient = Hatchet.init();
  }
  return hatchetClient;
};

This is the entire file.

I investigated further and It is linked to the tsconfig configuration.
I had inside compilerOptions:
"declarationMap": false,
"declaration": false

by removing these lines it disappears while running in dev.

No still happens

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

2 participants