I removed the keywords section of my package.json and the next time I ran lb4 model, I received this error:
Generation is aborted: Error: No `loopback` keyword found in /Users/dcain/Code/meal-api/package.json. The command must be run in a LoopBack project.
I add "loopback" as a keyword in my package.json and the problem goes away. I see here that this is to make sure that we are in a loopback project.
I mean, this is an approach that possibly works, but it does feel kinda weird to have to keep the "loopback" keyword in my package.json. Instead, why don't we check the dependencies for a loopback package? Right below the code in the link above, the dependencies are parsed so it would be easy to look there. Or, what happens if we just skip that check? Is it really needed?
@dericgw It's a protective check to make sure the command is running inside a valid LoopBack 4 project. I'm open to use other metadata such as dependencies in package.json. Are you willing to contribute a patch?
I don't mind doing that. Do you think @loopback/core is the best package to depend upon? Or, should the CLI just look and see if any @loopback packages are available?
I think @loopback/core is a good bet.
Most helpful comment
I think
@loopback/coreis a good bet.