loopbackio / loopback-next

LoopBack makes it easy to build modern API applications that require complex integrations.
https://loopback.io
Other
4.95k stars 1.07k forks source link

CLI v2.12.0: lb4 model command with model name argument HANG #6078

Closed alcmontejo closed 3 years ago

alcmontejo commented 4 years ago

Steps to reproduce

  1. Update CLI to @loopback/cli version: 2.12.0
  2. Create new APP
  3. Create new Model with additional model name argument $ lb4 model [<name>]

Current Behavior

CLI will not proceed and appears to be HANG.

Expected Behavior

CLI should proceed with the selection of model base class

Link to reproduction sandbox

Can be reproduced in any existing lb4 sample app

Additional information

node -e 'console.log(process.platform, process.arch, process.versions.node)'

win32 x64 12.18.3

npm ls --prod --depth 0 | grep loopback

@loopback/example-todo@3.7.0 C:\projects\open-source\loopback4-example-todo +-- @loopback/boot@2.4.1 +-- @loopback/core@2.9.3 +-- @loopback/repository@2.11.0 +-- @loopback/rest@6.0.0 +-- @loopback/rest-explorer@2.2.8 +-- @loopback/service-proxy@2.3.6 +-- loopback-connector-rest@3.7.0

Related Issues

lb4 command hangs: https://github.com/strongloop/loopback-next/issues/3187

alcmontejo commented 4 years ago

kindly label as CLI tnx

alcmontejo commented 4 years ago

btw, not reproducible in MAC using below:

node -e 'console.log(process.platform, process.arch, process.versions.node)'

darwin x64 10.16.3

npm ls --prod --depth 0 | grep loopback

@loopback/example-todo@3.7.0 ***/loopback4-example-todo ├── @loopback/boot@2.4.1 ├── @loopback/core@2.9.3 ├── @loopback/repository@2.11.0 ├── @loopback/rest@6.0.0 ├── @loopback/rest-explorer@2.2.8 ├── @loopback/service-proxy@2.3.6 ├── loopback-connector-rest@3.7.0

dhmlau commented 4 years ago

@alcmontejo, which node.js version are you on? I just tried with my Windows 10 machine with Node.js 12.14.1 (using nvm), it seems to be working fine.

I ran lb4 app and then lb4 model to create new app and then new model.

alcmontejo commented 4 years ago

@dhmlau yep it works for me w/out the 2nd argument (name of the object). However, when I supply the model name in initial command lb4 model [<name>] that where it hangs.

Im on nodejs v12.18.3

dhmlau commented 4 years ago

You're right! lb4 model works but lb4 model <name> not. I was able to reproduce it on Windows but not Mac. Not sure if it's related to inquirer like last time. @agnes512, could you please take a look? Thanks.

stale[bot] commented 3 years ago

This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository. This issue will be closed within 30 days of being stale.

stale[bot] commented 3 years ago

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.