Have NodePackageInstallTask use project directory if no directory specified
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- angular, typescript
Research direction
Locate NodePackageInstallTask and the package.json path handling in the Angular CLI schematics code. Reproduce the externalSchematic ng-new scenario, then verify that new and add tasks install from the newly created project directory by default and that the requested compatibility option preserves the existing behavior.
Written by the indexing model from the issue text.
Description
🚀 Feature request
Command (mark with an x)
- new
- build
- serve
- test
- e2e
- generate
- add
- update
- lint
- extract-i18n
- run
- config
- help
- version
- doc
Description
A clear and concise description of the problem or missing capability...NodePackageInstallTask is frequently used by add tasks such as ng-add in @angular/material. If a schematic like this is called from a custom ng-new schematic using externalSchematic the install fails because it is run from some non-project directory rather than from inside the newly created project directory.
Describe the solution you'd like
If you have a solution in mind, please describe it.Since schematics knows the location of package.json it should by default run NodePackageInstallTask from that same directory rather than using the working directory.
This would unfortunately qualify as a "breaking" change so a configuration option might be necessary to allow for the "old" (current) behavior once this change is made.
Describe alternatives you've considered
Have you considered any alternative solutions or workarounds?The only work-around I've been able to do is essentially replicating the behaviors of third-party schematic "add" tasks within my custom schematic and then running install after the fact which is less than ideal.
- Dominant language
- TypeScript
- Stars
- 27k
- Forks
- 11.8k
- Avg merge
- 16h 35m
- Merged PRs (30d)
- 176
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from angular/angular-cli
-
area: @angular/build gemini-triaged
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
angular/angular-cli#33955 ·
-
area: @angular/cli gemini-triaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
angular/angular-cli#33055 · 1 comment · 3 reactions ·
-
area: @angular/build gemini-triaged
Difficulty 4/5 3-5 days Newbie friendliness 72/100
angular/angular-cli#34137 ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34131 · 1 assignee ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34130 · 1 assignee ·
All issues in angular/angular-cli
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vicharanashala/fln#563 ·