NativeScript / nativescript-cli

Command-line interface for building NativeScript apps
https://www.npmjs.com/package/nativescript
Apache License 2.0
1.04k stars 195 forks source link

TNS cli genereate Service #4209

Open applke opened 5 years ago

applke commented 5 years ago

`Error: Schematic input does not validate against the Schema: {"flat":true,"spec":true,"lintFix":false} Errors:

Data path "" should have required property 'name'.`

Command : tns generate service user

NickIliev commented 5 years ago

@applke I think the error message you are receving is stating that you need to pass a name like this

tns generate service name=my-service

Still even the above is crashing on my side (Widnows with tns 5.0.3) with the followin:

$ tns generate service name=my-service
RangeError: Maximum call stack size exceeded
    at t._error (C:\Users\niliev\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:16:1479)
    at t.error (C:\Users\niliev\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:16:1173)
    at t._error (C:\Users\niliev\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:16:1479)
    at t.error (C:\Users\niliev\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:16:1173)
    at t._error (C:\Users\niliev\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:16:1479)
    at t.error (C:\Users\niliev\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:16:1173)
    at t._error (C:\Users\niliev\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:16:1479)
    at t.error (C:\Users\niliev\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:16:1173)
    at t._error (C:\Users\niliev\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:16:1479)
    at t.error (C:\Users\niliev\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:16:1173)
arodiani commented 5 years ago

Any update here? i have the same problem

flynsequeira commented 5 years ago

Facing the same issue. Let me know what the problem is

sebawita commented 5 years ago

I think that it is better to use the Angular CLI for now, as we are still experimenting with this in the NativeScript CLI.

The following should work:

ng generate service user

Note, that you will need the Angular CLI v7