Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.

Warning: please enter the name property again. The default value provided "" is not valid for type: string #13

Closed
bedrytskyi opened this issue Jul 28, 2016 · 9 comments
Assignees
Labels

Comments

@bedrytskyi
Copy link

bedrytskyi commented Jul 28, 2016

After Property name -> Property type ->Required? -> Default value[leave blank for none] it throws me an error:

Warning: please enter the name property again. The default value provided "" is not valid for type: string

And asks me to select Property type once again! What is it? Why so rough start, guys?

@superkhau superkhau added the doc label Jul 28, 2016
@superkhau
Copy link
Contributor

@crandmck ^ Is something wrong with the example?

@bedrytskyi
Copy link
Author

bedrytskyi commented Jul 28, 2016

I did everything step by step from http://docs.strongloop.com/display/LB/Getting+started+with+LoopBack and then from Getting started page http://loopback.io/getting-started/ (which are basically the same). Working on Ubuntu.

@bedrytskyi
Copy link
Author

The problem is that "Default value[leave blank for none]" doesn't mention in any of your tutorials! I should leave blank or fill with some value?

@bedrytskyi
Copy link
Author

Ok, I got it, I must set some value in that step. You should change a tutorial if this is new.

@superkhau
Copy link
Contributor

@bedrytskyi Thanks for the feedback, @crandmck Can you look into this? Maybe we need to update the tutorial?

@davidcheung @deepakrkris I leave this up to you from here on since you are the repo owners.

@davidcheung
Copy link

davidcheung commented Jul 28, 2016

@jannyHou
Copy link
Contributor

@bedrytskyi I think the error msg has been fixed by the latest version of [email protected]
I believe a blank default value will pass now.

Please reinstall your global generator-loopback to get it work.
If you don't prefer install it globally, you can update it inside strongloop

DefaultValue prompt is a feature we just improved, will add it in doc soon. Thanks for reminding!


Test from my local with the latest generator-loopback:

Let's add another CoffeeShops property.
Enter an empty property name when done.
? Property name: city
   invoke   loopback:property
? Property type: string
? Required? No
? Default value[leave blank for none]: 

Let's add another CoffeeShops property.
Enter an empty property name when done.
? Property name: name2
   invoke   loopback:property
? Property type: string
? Required? Yes
? Default value[leave blank for none]: 

@jannyHou
Copy link
Contributor

@crandmck I think we can add this in doc after property type selection:

You can define a "Default value" for your property, or leave it blank and click "Enter" if you don't need one:

? Default value[leave blank for none]: 

@crandmck
Copy link
Contributor

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants