Skip to content

Local workspace file angular.json could not be found #17

@DannyCare

Description

@DannyCare

Trying to create the post class with the following command:

ng g class /posts/post

Outputs the following error:

Error: Local workspace file ('angular.json') could not be found.
    at WorkspaceLoader._getProjectWorkspaceFilePath (/usr/local/lib/node_modules/@angular/cli/models/workspace-loader.js:44:19)
    at WorkspaceLoader.loadWorkspace (/usr/local/lib/node_modules/@angular/cli/models/workspace-loader.js:31:21)
    at GenerateCommand._loadWorkspace (/usr/local/lib/node_modules/@angular/cli/models/schematic-command.js:292:29)
    at GenerateCommand.<anonymous> (/usr/local/lib/node_modules/@angular/cli/models/schematic-command.js:57:18)
    at Generator.next (<anonymous>)
    at /usr/local/lib/node_modules/@angular/cli/models/schematic-command.js:14:71
    at new Promise (<anonymous>)
    at __awaiter (/usr/local/lib/node_modules/@angular/cli/models/schematic-command.js:10:12)
    at GenerateCommand.initialize (/usr/local/lib/node_modules/@angular/cli/models/schematic-command.js:56:16)
    at GenerateCommand.<anonymous> (/usr/local/lib/node_modules/@angular/cli/commands/generate.js:41:40)

All steps followed, npm installed and the project compiles but just doesn't work with the command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions