1
votes

I'm new to StrongLoop and Loopback. I am trying to follow the 'getting started' tutorial on the strongloop tutorial. When I attempt to use the command line tool to create a new model, everything works up until it the first prompt to add a property to the model. No matter what I enter for the property name, I am given an error.

~/Dev/sandbox/loopback/loopback-getting-started > slc loopback:model
? Enter the model name: CoffeeShop
? Select the data-source to attach undefined to: db (memory)
? Select model's base class PersistedModel
? Expose CoffeeShop via the REST API? Yes
? Custom plural form (used to build REST URL):
? Common model or server only? common
Let's add some CoffeeShop properties now.

Enter an empty property name when done.
? Property name:
>> Name cannot contain special characters [object Object]name

Obviously, I am not entering any special characters, just the string 'name'.

I am using Zsh, not bash, and iTerm2, not terminal. I don't think this would be a problem, as the other prompts did not throw an error at me. Any thoughts?

Thanks, Joe

1

1 Answers

2
votes

I had the exact same issue and assumed it was iTerm2/Zsh related - however after some digging it seemed to be due to a bug in the generator-loopback npm package. See the Github issue here:

https://github.com/strongloop/loopback/issues/2292

Updating to version 1.21.1 with

npm install -g [email protected]

fixed the issue for me.

Hope that helps,

James