We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
In my project's tsconfig.json and tsconfig.spec.json I specified alias paths
"paths": { "~~*": ["../../*"], //<-- refers to the workspace's root // .... other paths }
in /jest.config.ts
import jestConfig from '~~jest.config'; export default jestConfig({ _projectRoot: __dirname });
When I add the plugin nx add @nx/jest, the following error occurs
nx add @nx/jest
5 errors occurred while processing files for the @nx/jest/plugin plugin . - apps/assets/jest.config.ts: Cannot find module '../../~~jest.config' Require stack: - /workspaces/mashrouk/apps/assets/jest.config.ts - /workspaces/mashrouk/node_modules/.pnpm/@[email protected][email protected]_@[email protected]_@[email protected]_@[email protected]__ffljwscjdaomkqev3az6ugtrei/node_modules/@nx/devkit/src/utils/config-utils.js - /workspaces/mashrouk/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected]_@swc+help_oj4j7lrynaepz4txa3cmv4ytzy/node_modules/@nx/jest/src/plugins/plugin.js - /workspaces/mashrouk/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected]_@swc+help_oj4j7lrynaepz4txa3cmv4ytzy/node_modules/@nx/jest/src/generators/init/init.js - /workspaces/mashrouk/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected]__@[email protected]_7t2fh5y3gx2kwbf7qy6cwswh3m/node_modules/nx/src/config/schema-utils.js - /workspaces/mashrouk/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected]__@[email protected]_7t2fh5y3gx2kwbf7qy6cwswh3m/node_modules/nx/src/command-line/run/executor-utils.js - /workspaces/mashrouk/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected]__@[email protected]_7t2fh5y3gx2kwbf7qy6cwswh3m/node_modules/nx/src/project-graph/utils/project-configuration-utils.js - /workspaces/mashrouk/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected]__@[email protected]_7t2fh5y3gx2kwbf7qy6cwswh3m/node_modules/nx/src/utils/package-json.js - /workspaces/mashrouk/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected]__@[email protected]_7t2fh5y3gx2kwbf7qy6cwswh3m/node_modules/nx/bin/nx.js - apps/core/jest.config.ts: Cannot find module '../../~~jest.config' ...
According to ts paths, the resolved path should be ../../jest.config instead of ../../~~jest.config
../../jest.config
../../~~jest.config
I can run the test without NX without any problem, and vs code can see the path correctly
The alias path should be resolved correctly
No response
Node : 22.12.0 OS : linux-x64 Native Target : x86_64-linux pnpm : 9.15.0 nx (global) : 21.1.2 nx : 21.1.2 @nx/js : 21.1.2 @nx/jest : 21.1.2 @nx/eslint : 21.1.2 typescript : 5.8.3 --------------------------------------- Registered Plugins: @nx/js/typescript --------------------------------------- Cache Usage: 7.76 MB / 46.73 GB
pnpm v9.15.0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Current Behavior
In my project's tsconfig.json and tsconfig.spec.json I specified alias paths
in /jest.config.ts
When I add the plugin
nx add @nx/jest
, the following error occursAccording to ts paths, the resolved path should be
../../jest.config
instead of../../~~jest.config
I can run the test without NX without any problem, and vs code can see the path correctly
Expected Behavior
The alias path should be resolved correctly
GitHub Repo
No response
Steps to Reproduce
Nx Report
Failure Logs
Package Manager Version
pnpm v9.15.0
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: