Skip to content

Unable to RUN ng commands. #12173

@mohitidol

Description

@mohitidol

I am not able to create the Compnent using ng g c comp_name.

I realised that in my package json I do not have

"@angular/cli": "^5.0.0",

how ever when I check the version. Atached the screen shot. Need help urgently.

error

When I run ng g c zippy

Below is the error

$ ng g c zippy
Local workspace file ('angular.json') could not be found.
Error: Local workspace file ('angular.json') could not be found.
at WorkspaceLoader._getProjectWorkspaceFilePath (C:\Users\mohit_mathur\AppData\Roaming\npm\node_modules@angular\cli\models\workspace-loader.js:44:19)
at WorkspaceLoader.loadWorkspace (C:\Users\mohit_mathur\AppData\Roaming\npm\node_modules@angular\cli\models\workspace-loader.js:31:21)
at GenerateCommand._loadWorkspace (C:\Users\mohit_mathur\AppData\Roaming\npm\node_modules@angular\cli\models\schematic-command.js:292:29)
at GenerateCommand. (C:\Users\mohit_mathur\AppData\Roaming\npm\node_modules@angular\cli\models\schematic-command.js:57:18)
at Generator.next ()
at C:\Users\mohit_mathur\AppData\Roaming\npm\node_modules@angular\cli\models\schematic-command.js:14:71
at new Promise ()
at __awaiter (C:\Users\mohit_mathur\AppData\Roaming\npm\node_modules@angular\cli\models\schematic-command.js:10:12)
at GenerateCommand.initialize (C:\Users\mohit_mathur\AppData\Roaming\npm\node_modules@angular\cli\models\schematic-command.js:56:16)
at GenerateCommand. (C:\Users\mohit_mathur\AppData\Roaming\npm\node_modules@angular\cli\commands\generate.js:41:40)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions