-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
@nx/js/typescript Can't resolve modules in "extends" of tsconfig #28618
Comments
Not sure if it's the same case but I have similar error, while deploying:
Locally build is working. |
This was solved by #28535, and the fix was released in Nx v20.0.6. @rads92stx, that's a different issue. Please create a new issue (if you haven't yet or there isn't one already) with a reproduction or clear steps on how to reproduce it. |
thank you 🙌 |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
I have setup a poc @ my company using nx. I created an internal package, which contains all configuration files for eslint, prettier and typescript. The setup works verifiable with vscode and tsc in the terminal. The problem is, that I can't build the project using nx, as the typescript plugin won't resolve either one of the used extends statements with modules.
The first instance is in the root and the /apps/* tsconfigs, where I extend the internal pnpm workspace package.
The second instance is in the base config in the package (packages/style-guide/typescript/tsconfig.base.json) where I want to use vercels base config as my base.
As it is now, i cannot build my ts apps while this plugin is in the
nx.json
file.Expected Behavior
I expect @nx/js/typescript to be able to resolve...
... in the "extends" field of tsconfig files
GitHub Repo
https://github.com/jonasschultheiss/poc_branching-versioning-strategy/tree/repro/nx-ts
Steps to Reproduce
nx.json
andnx copy.json
. First doesn't have plugin config, later one does.nx reset && pnpm build
-> build succeedsmv nx.json nx-no-plugin.json && mv nx\ copy.json nx.json
or do it by hand.nx reset && pnpm build --verbose
-> build failsNx Report
nx (global) : 20.0.5
nx : 20.0.5
@nx/js : 20.0.5
@nx/eslint : 20.0.5
@nx/eslint-plugin : 20.0.5
@nx/next : 20.0.5
typescript : 5.6.3
Registered Plugins:
@nx/next/plugin
@nx/eslint/plugin
Failure Logs
Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.
An error occurred while processing files for the @nx/js/typescript plugin.
- apps/docs/tsconfig.json: ENOENT: no such file or directory, stat '/Users/jonasschultheiss/coding/poc_branching-versioning-strategy-turbo/apps/docs/@pax/style-guide/typescript/next'
Error: ENOENT: no such file or directory, stat '/Users/jonasschultheiss/coding/poc_branching-versioning-strategy-turbo/apps/docs/@pax/style-guide/typescript/next'
at statSync (node:fs:1665:25)
at getTsConfigCacheKey (/Users/jonasschultheiss/coding/poc_branching-versioning-strategy-turbo/node_modules/.pnpm/@nx+js@20.0.5_@babel+traverse@7.25.9_@swc-node+register@1.10.9_@swc+core@1.7.39_@swc+helpers@bxugnulodkjozofnolsq7zoyuy/node_modules/@nx/js/src/plugins/typescript/plugin.js:387:46)
at readCachedTsConfig (/Users/jonasschultheiss/coding/poc_branching-versioning-strategy-turbo/node_modules/.pnpm/@nx+js@20.0.5@babel+traverse@7.25.9_@swc-node+register@1.10.9_@swc+core@1.7.39_@swc+helpers@bxugnulodkjozofnolsq7zoyuy/node_modules/@nx/js/src/plugins/typescript/plugin.js:378:22)
at getExtendedConfigFiles (/Users/jonasschultheiss/coding/poc_branching-versioning-strategy-turbo/node_modules/.pnpm/@nx+js@20.0.5@babel+traverse@7.25.9_@swc-node+register@1.10.9_@swc+core@1.7.39_@swc+helpers@bxugnulodkjozofnolsq7zoyuy/node_modules/@nx/js/src/plugins/typescript/plugin.js:292:32)
at createNodesInternal (/Users/jonasschultheiss/coding/poc_branching-versioning-strategy-turbo/node_modules/.pnpm/@nx+js@20.0.5@babel+traverse@7.25.9_@swc-node+register@1.10.9_@swc+core@1.7.39_@swc+helpers@bxugnulodkjozofnolsq7zoyuy/node_modules/@nx/js/src/plugins/typescript/plugin.js:84:33)
at /Users/jonasschultheiss/coding/poc_branching-versioning-strategy-turbo/node_modules/.pnpm/@nx+js@20.0.5@babel+traverse@7.25.9_@swc-node+register@1.10.9_@swc+core@1.7.39_@swc+helpers@bxugnulodkjozofnolsq7zoyuy/node_modules/@nx/js/src/plugins/typescript/plugin.js:41:95
at /Users/jonasschultheiss/coding/poc_branching-versioning-strategy-turbo/node_modules/.pnpm/nx@20.0.5@swc-node+register@1.10.9_@swc+core@1.7.39_@swc+helpers@0.5.13__@swc+types@0.1.13_t_ybqmveuqbang66zbpqsm6724rq/node_modules/nx/src/project-graph/plugins/utils.js:10:33
at Array.map ()
at createNodesFromFiles (/Users/jonasschultheiss/coding/poc_branching-versioning-strategy-turbo/node_modules/.pnpm/nx@20.0.5_@swc-node+register@1.10.9_@swc+core@1.7.39_@swc+helpers@0.5.13__@swc+types@0.1.13_t_ybqmveuqbang66zbpqsm6724rq/node_modules/nx/src/project-graph/plugins/utils.js:8:35)
at exports.createNodesV2 (/Users/jonasschultheiss/coding/poc_branching-versioning-strategy-turbo/node_modules/.pnpm/@nx+js@20.0.5_@babel+traverse@7.25.9_@swc-node+register@1.10.9_@swc+core@1.7.39_@swc+helpers@bxugnulodkjozofnolsq7zoyuy/node_modules/@nx/js/src/plugins/typescript/plugin.js:41:60)
- apps/web/tsconfig.json: ENOENT: no such file or directory, stat '/Users/jonasschultheiss/coding/poc_branching-versioning-strategy-turbo/apps/web/@pax/style-guide/typescript/next'
Error: ENOENT: no such file or directory, stat '/Users/jonasschultheiss/coding/poc_branching-versioning-strategy-turbo/apps/web/@pax/style-guide/typescript/next'
at statSync (node:fs:1665:25)
at getTsConfigCacheKey (/Users/jonasschultheiss/coding/poc_branching-versioning-strategy-turbo/node_modules/.pnpm/@nx+js@20.0.5@babel+traverse@7.25.9_@swc-node+register@1.10.9_@swc+core@1.7.39_@swc+helpers@bxugnulodkjozofnolsq7zoyuy/node_modules/@nx/js/src/plugins/typescript/plugin.js:387:46)
at readCachedTsConfig (/Users/jonasschultheiss/coding/poc_branching-versioning-strategy-turbo/node_modules/.pnpm/@nx+js@20.0.5@babel+traverse@7.25.9_@swc-node+register@1.10.9_@swc+core@1.7.39_@swc+helpers@bxugnulodkjozofnolsq7zoyuy/node_modules/@nx/js/src/plugins/typescript/plugin.js:378:22)
at getExtendedConfigFiles (/Users/jonasschultheiss/coding/poc_branching-versioning-strategy-turbo/node_modules/.pnpm/@nx+js@20.0.5@babel+traverse@7.25.9_@swc-node+register@1.10.9_@swc+core@1.7.39_@swc+helpers@bxugnulodkjozofnolsq7zoyuy/node_modules/@nx/js/src/plugins/typescript/plugin.js:292:32)
at createNodesInternal (/Users/jonasschultheiss/coding/poc_branching-versioning-strategy-turbo/node_modules/.pnpm/@nx+js@20.0.5@babel+traverse@7.25.9_@swc-node+register@1.10.9_@swc+core@1.7.39_@swc+helpers@bxugnulodkjozofnolsq7zoyuy/node_modules/@nx/js/src/plugins/typescript/plugin.js:84:33)
at /Users/jonasschultheiss/coding/poc_branching-versioning-strategy-turbo/node_modules/.pnpm/@nx+js@20.0.5@babel+traverse@7.25.9_@swc-node+register@1.10.9_@swc+core@1.7.39_@swc+helpers@bxugnulodkjozofnolsq7zoyuy/node_modules/@nx/js/src/plugins/typescript/plugin.js:41:95
at /Users/jonasschultheiss/coding/poc_branching-versioning-strategy-turbo/node_modules/.pnpm/nx@20.0.5@swc-node+register@1.10.9_@swc+core@1.7.39_@swc+helpers@0.5.13__@swc+types@0.1.13_t_ybqmveuqbang66zbpqsm6724rq/node_modules/nx/src/project-graph/plugins/utils.js:10:33
at Array.map ()
at createNodesFromFiles (/Users/jonasschultheiss/coding/poc_branching-versioning-strategy-turbo/node_modules/.pnpm/nx@20.0.5_@swc-node+register@1.10.9_@swc+core@1.7.39_@swc+helpers@0.5.13__@swc+types@0.1.13_t_ybqmveuqbang66zbpqsm6724rq/node_modules/nx/src/project-graph/plugins/utils.js:8:35)
at exports.createNodesV2 (/Users/jonasschultheiss/coding/poc_branching-versioning-strategy-turbo/node_modules/.pnpm/@nx+js@20.0.5_@babel+traverse@7.25.9_@swc-node+register@1.10.9_@swc+core@1.7.39_@swc+helpers@_bxugnulodkjozofnolsq7zoyuy/node_modules/@nx/js/src/plugins/typescript/plugin.js:41:60)
Package Manager Version
pnpm@9.12.2
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: