You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when building an Nx project that imports a function from a library using either @nx/esbuild:esbuild or @nx/js:tsc, I encounter the following error: error TS6307: File 'C:/Users/.../my-nx-monorepo/org/libs/mylibrary/src/index.ts' is not listed within the file list of project ''. Projects must list all files or use an 'include' pattern.
This indicates that the library file is not being recognized as part of the project during compilation, even though it is properly imported.
Expected Behavior
I expect the Nx project to successfully build without errors when using @nx/esbuild:esbuild or @nx/js:tsc, recognizing the imported library as part of the project. The build process should correctly include all necessary files from the library without requiring manual adjustments to the project's tsconfig.json or other configurations.
import relatively mylibrary function from libs/mylibrary 'import { mylibrary } from "../../../libs/mylibrary/src";'
in the myapp tsconfig.app.json file add the path to the mylibrary tsconfig.lib.json for the composite build '"path": "../../libs/mylibrary/tsconfig.lib.json"'
set "emitDeclarationOnly" property to "false"
build myapp "nx build myapp"
The error occurs right here.
We will get a similar error if we use @nx/js:tsc as the executor instead of @nx/esbuild:esbuild
At the same time, if we build myapp using the command "tsc --build apps/myapp/tsconfig.app.json", then myapp and mylibrary are built without any errors
Current Behavior
Currently, when building an Nx project that imports a function from a library using either @nx/esbuild:esbuild or @nx/js:tsc, I encounter the following error:
error TS6307: File 'C:/Users/.../my-nx-monorepo/org/libs/mylibrary/src/index.ts' is not listed within the file list of project ''. Projects must list all files or use an 'include' pattern.
This indicates that the library file is not being recognized as part of the project during compilation, even though it is properly imported.
Expected Behavior
I expect the Nx project to successfully build without errors when using @nx/esbuild:esbuild or @nx/js:tsc, recognizing the imported library as part of the project. The build process should correctly include all necessary files from the library without requiring manual adjustments to the project's tsconfig.json or other configurations.
GitHub Repo
https://github.com/mavliut-fozliev/org
Steps to Reproduce
The error occurs right here.
We will get a similar error if we use @nx/js:tsc as the executor instead of @nx/esbuild:esbuild
At the same time, if we build myapp using the command "tsc --build apps/myapp/tsconfig.app.json", then myapp and mylibrary are built without any errors
Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: