nativescript-schematics icon indicating copy to clipboard operation
nativescript-schematics copied to clipboard

angular cli commands silently fails

Open NickIliev opened this issue 6 years ago • 3 comments

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" image

Copied from original issue: NativeScript/NativeScript#6991

NickIliev avatar Mar 06 '19 11:03 NickIliev

updating angular cli didn't help . tns create command doesn't put schema.json in its folder. image

MAXMASTER001 avatar Mar 06 '19 13:03 MAXMASTER001

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.

MAXMASTER001 avatar Mar 06 '19 23:03 MAXMASTER001

Problem solved.... npm uninstall -g @angular/cli npm cache verify npm install -g @angular/cli

MAXMASTER001 avatar Mar 07 '19 18:03 MAXMASTER001