angular cli commands silently fails
From @MAXMASTER001 on March 6, 2019 9:47
Environment os: Macos-Mojave; node version: 10.15.2
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
- CLI: 5.2.1
- Cross-platform modules:
- Android Runtime:5.2.0
- iOS Runtime:5.2.2
- Plugin(s): -
Describe the bug I can't create components using angular cli , for example "ng g c home" command fails without giving any information.
To Reproduce
tns create secondapp cd secondapp ng g c home
Expected behavior home component should be created. Sample project
Additional context
a year ago i installed nativescript. played a bit. node version was 8.9.4. unistalling that version was hard. I switched to 8.9.4. npm uninstall nativescript -g didnt completely remove nativescript. tns command was working. ( maybe a cache issue) ( I am using nvm as node version manger by the way). this might be the cause.
in the screenshot below i recognized this.. vscode complaning no" no such file or directory"

Copied from original issue: NativeScript/NativeScript#6991
updating angular cli didn't help . tns create command doesn't put schema.json in its folder.

deleting node_modules and npm install helped. Now ng generate component now works but ng generate service doesn't still no schema.json file in its folder.
Problem solved.... npm uninstall -g @angular/cli npm cache verify npm install -g @angular/cli