Repository navigation
Conversation
…ensionless imports)
|
View your CI Pipeline Execution ↗ for commit b5ace0a
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
✅ The fix from Nx Cloud was applied
We've fixed the scheduler:test failure by adding const __dirname = import.meta.dirname; to packages/scheduler/jest.config.ts. Since the workspace uses "module": "nodenext", Jest config files run as ES modules where __dirname is not globally available, causing the ReferenceError at startup. This aligns the scheduler package with the pattern used by all other packages in the monorepo.
Tip
✅ We verified this fix by re-running scheduler:test.
Suggested Fix changes
diff --git a/packages/scheduler/jest.config.ts b/packages/scheduler/jest.config.ts
index 8c5f4ed..1bb5361 100644
--- a/packages/scheduler/jest.config.ts
+++ b/packages/scheduler/jest.config.ts
@@ -1,8 +1,9 @@
import { readFileSync } from 'fs';
+const __dirname = import.meta.dirname;
+
// Reading the SWC compilation config for the spec files
const swcJestConfig = JSON.parse(
- // eslint-disable-next-line @typescript-eslint/no-require-imports
readFileSync(`${__dirname}/.spec.swcrc`, 'utf-8'),
);
➡️ This fix was applied by Saba Pochkhua
🎓 Learn more about Self-Healing CI on nx.dev
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Brief description of changes
Type of Change
Testing
Checklist