Skip to content

Could not locate package.json in certain scenarios #32

@kroeder

Description

@kroeder

When running ng generate ngx-cli-toolkit:update-schematic foo the generator sometimes cannot locate the project package.json

I tested it with the following setup

projects/
├─ ui/ 
│  ├─ schematics/
│  │  ├─ ng-update/
│  │  │  ├─ migrations/
│  │  │  │  ├─ v4/
│  │  ├─ migrations.json
│  ├─ package.json

Execution in

projects/
├─ ui/

Does work. Also in

projects/
├─ ui/ 
│  ├─ schematics/
│  │  ├─ ng-update/
│  │  │  ├─ migrations/

But as soon as I am in the v4 directory I get

Could not locate package.json based on path /projects/ui/schematics/ng-update/v4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggenerate:ng-updateEverything related to the generation of ng-update schematics

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions