-
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 17 - Buildable Angular libs fail lint upon generation with The "tslib" package is not used by "my-lib" project
#21023
Comments
Similarly I get an error during lint if I don't utilize
My organization uses these Angular libraries to hold utilities - some of which might just be plain TypeScript functions & could contain shared Angular Pipes for instance. Is the expected behavior here to remove |
same behavior with latest nx angular monorepo project with generated publishable library
|
Hey! It looks your GH Repo is 404ing. Could you provide me with another repo so that I can investigate further? |
@Coly010 my apologies; did a repo cleanup and forgot I had one linked to this issue 😅. I updated the issue description with a new repo; updated to latest Nx and issue is still reproducible. |
…23423) <!-- 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 --> When generating buildable and publishable angular libraries, we always add `tslib` to the `package.json#dependencies`. These libaries may not actually use this dependency and therefore it is redundant. ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> Do not add `tslib` by default. If users need it, they can add it when they do. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #21023
…23423) <!-- 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 --> When generating buildable and publishable angular libraries, we always add `tslib` to the `package.json#dependencies`. These libaries may not actually use this dependency and therefore it is redundant. ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> Do not add `tslib` by default. If users need it, they can add it when they do. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #21023 (cherry picked from commit 34547b3)
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
When generating a buildable Angular library, lint for the new library fails right away with the following error:
Expected Behavior
Newly generated Angular libraries (buildable or not) should not fail lint.
GitHub Repo
https://github.com/abaran30/nx-angular
Steps to Reproduce
gh repo clone abaran30/nx-angular
npm ci
npx nx generate @nx/angular:library --name=my-lib --buildable=true --projectNameAndRootFormat=derived --standalone=false --style=none --no-interactive
npx nx run my-lib:lint
Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
As shown in the failure logs, the lint error is fixable with the
--fix
option. The fixer removestslib
from the the library's package.jsondependencies
. Shouldtslib
not be included upon generation?The text was updated successfully, but these errors were encountered: