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

running @nx/angular:ng-packagr-lite from a subdirectory doesn't work #23091

Closed
1 of 4 tasks
lebbers opened this issue Apr 30, 2024 · 0 comments · Fixed by #23165
Closed
1 of 4 tasks

running @nx/angular:ng-packagr-lite from a subdirectory doesn't work #23091

lebbers opened this issue Apr 30, 2024 · 0 comments · Fixed by #23165
Assignees
Labels
scope: angular Issues related to Angular support in Nx type: bug

Comments

@lebbers
Copy link

lebbers commented Apr 30, 2024

Current Behavior

Building an Angular library using the @nx/angular:ng-packagr-lite executor from the root of the mono-repo works correctly but if it is ran from a subdirectory it throws an error.

Expected Behavior

The ng-packagr-lite command should work if run from a subdirectory.
Running any other nx command (test or lint) or building the angular-store from a subdirectory in the mono-repo works just fine.

GitHub Repo

https://github.com/nrwl/nx-recipes

Steps to Reproduce

  1. git clone https://github.com/nrwl/nx-recipes
  2. cd ./nx-recipes/angular-monorepo/
  3. npm install
  4. nx g @nx/angular:lib my-lib --directory=libs/my-lib --buildable
  5. cd ./libs/my-lib/
  6. nx build my-lib

Nx Report

Node   : 18.19.0
OS     : darwin-arm64
npm    : 10.2.3

nx (global)        : 17.2.8
nx                 : 18.0.5
@nx/js             : 18.0.5
@nx/jest           : 18.0.5
@nx/linter         : 18.0.5
@nx/eslint         : 18.0.5
@nx/workspace      : 18.0.5
@nx/angular        : 18.0.5
@nx/cypress        : 18.0.5
@nx/devkit         : 18.0.5
@nx/eslint-plugin  : 18.0.5
@nrwl/tao          : 18.0.5
@nx/web            : 18.0.5
@nx/webpack        : 18.0.5
typescript         : 5.3.3

Failure Logs

> nx run my-lib:build:production

Building Angular Package

 NX   error TS5012: Cannot read file '/Users/.../nx-recipes/angular-monorepo/libs/my-lib/libs/my-lib/tsconfig.lib.prod.json': ENOENT: no such file or directory, open '/Users/.../nx-recipes/angular-monorepo/libs/my-lib/libs/my-lib/tsconfig.lib.prod.json'.

error TS18003: No inputs were found in config file '/Users/.../nx-recipes/angular-monorepo/tmp/libs/my-lib/tsconfig.generated.json'. Specified 'include' paths were '["**/*"]' and 'exclude' paths were '[]'.

Pass --verbose to see the stacktrace.

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@leosvelperez leosvelperez added the scope: angular Issues related to Angular support in Nx label Apr 30, 2024
@leosvelperez leosvelperez self-assigned this Apr 30, 2024
leosvelperez added a commit that referenced this issue May 3, 2024
…ends from the correct path (#23165)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #23091
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: angular Issues related to Angular support in Nx type: bug
Projects
None yet
2 participants