Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI command is dead #2569

Closed
changchengchang opened this issue Mar 11, 2019 · 10 comments
Closed

CLI command is dead #2569

changchengchang opened this issue Mar 11, 2019 · 10 comments
Labels
CLI os:Windows Issues specific to Windows

Comments

@changchengchang
Copy link

Description / Steps to reproduce / Feature proposal

In my Windows 10, Nodejs 11 and @loopback/cli 1.8.1 are installed.

Current Behavior

When running any lb4 command, it stopped. There is no error. I tried different version of nodejs and loopback cli. It is the same. Other cli works (e.g. lb3 cli)

Expected Behavior

The command works

See Reporting Issues for more tips on writing good issues

@dhmlau
Copy link
Member

dhmlau commented Mar 14, 2019

@changchengchang, I just tried with the following configurations on my Windows 10 machine and it seems to be working fine:

  • Node.js 11.6.0
  • @loopback/cli - 1.8.1 or 1.8.2 (latest)

I'm using nvm to switch.
Perhaps you can try to reinstall @loopback/cli?

@dhmlau dhmlau self-assigned this Mar 14, 2019
@dhmlau
Copy link
Member

dhmlau commented Mar 19, 2019

@changchengchang, are you still encountering this problem?

@changchengchang
Copy link
Author

Yes. I tried different version of nodejs and lb4. The same problem occurred.

@dhmlau dhmlau added the CLI label Mar 19, 2019
@ceefour
Copy link
Contributor

ceefour commented Sep 18, 2019

Related to #3187 and strongloop/loopback-cli#88.

In my computer, I can reproduce using specific conditions (see below).

Windows 10 1903, Node.js v10.16.3, npm v6.11.3, lb4:

@loopback/cli version: 1.22.1

@loopback/* dependencies:
  - @loopback/authentication: ^3.0.1
  - @loopback/boot: ^1.5.6
  - @loopback/build: ^2.0.11
  - @loopback/context: ^1.23.0
  - @loopback/core: ^1.10.2
  - @loopback/metadata: ^1.3.2
  - @loopback/openapi-spec-builder: ^1.2.13
  - @loopback/openapi-v3: ^1.9.7
  - @loopback/repository-json-schema: ^1.10.0
  - @loopback/repository: ^1.14.0
  - @loopback/rest: ^1.19.0
  - @loopback/testlab: ^1.8.1
  - @loopback/docs: ^2.1.0
  - @loopback/example-hello-world: ^1.2.14
  - @loopback/example-log-extension: ^1.2.14
  - @loopback/example-rpc-server: ^1.2.14
  - @loopback/example-todo: ^1.8.0
  - @loopback/example-soap-calculator: ^1.6.15
  - @loopback/service-proxy: ^1.3.6
  - @loopback/http-caching-proxy: ^1.1.13
  - @loopback/http-server: ^1.4.13
  - @loopback/example-todo-list: ^1.10.0
  - @loopback/dist-util: ^0.4.0
  - @loopback/rest-explorer: ^1.3.7
  - @loopback/eslint-config: ^4.1.0
  - @loopback/example-express-composition: ^1.6.0
  - @loopback/example-greeter-extension: ^1.3.14
  - @loopback/booter-lb3app: ^1.3.0
  - @loopback/example-lb3-application: ^1.1.14
  - @loopback/example-greeting-app: ^1.2.0
  - @loopback/example-context: ^1.2.14
  - @loopback/repository-tests: ^0.4.5
  - @loopback/extension-health: ^0.2.6
  - @loopback/authorization: ^0.3.0
  - @loopback/rest-crud: ^0.3.0
  - @loopback/security: ^0.1.2

These work:

D:\project_amanah\S3\quakezone\quakezone-lb>lb4 datasource
? Datasource name:

D:\project_amanah\S3\quakezone\quakezone-lb>lb4 datasource
? Datasource name: thisisworking
? Select the connector for thisisworking: (Use arrow keys)
> In-memory db (supported by StrongLoop)
  In-memory key-value connector (supported by StrongLoop)
  IBM Object Storage (supported by StrongLoop)
  IBM DB2 (supported by StrongLoop)
  IBM DashDB (supported by StrongLoop)
  IBM MQ Light (supported by StrongLoop)
  IBM Cloudant DB (supported by StrongLoop)
(Move up and down to reveal more choices)

But the following does not work:

D:\project_amanah\S3\quakezone\quakezone-lb>lb4 datasource notworkingDS
(HANGS FOREVER)

Proof:

image

@dhmlau
Copy link
Member

dhmlau commented Sep 18, 2019

@changchengchang @ceefour, one more question.. Are you using nvm to manage the node version you're using? I have a Windows machine at home and using nvm, it generally works fine. You might want to give it a try.

@ceefour, for your particular issue, I just tried it on mac and there's no hanging. Let me try to reproduce on a Windows machine tonight.

@dhmlau dhmlau added the 2019Q4 label Sep 18, 2019
@ceefour
Copy link
Contributor

ceefour commented Sep 18, 2019

@dhmlau I don't use nvm. it's the standard official installer.

I'd love to share info with debug flags, verbose, more diagnosis, etc. if you tell me how to enable that.

Note that I can only reproduce this on lb4 datasource, I haven't found other command, e. g. lb4 app, which reproduces this problem. But I suspect there's a root cause for this that is not datasource specific.

@ceefour
Copy link
Contributor

ceefour commented Sep 18, 2019

@dhmlau also, spawning 'lb4 anything' from a node app (as child process) in Windows will make it stuck immediately (even with --yes). it's not exactly this issue but it is related. perhaps you can check if it also happens on mac.

by comparison, other scripts like npm install etc. I can run using node's spawn without issue.

@bajtos
Copy link
Member

bajtos commented Oct 15, 2019

FWIW, CLI tests are hanging in AppVeyor (Windows) when using Node.js versions newer than 10.0.0. Related discussions:

It makes me wonder - if you downgrade your Node.js version to 8, will it fix the problem?

@bajtos bajtos added the os:Windows Issues specific to Windows label Oct 15, 2019
@dhmlau dhmlau removed the 2019Q4 label Nov 18, 2019
@dhmlau dhmlau removed their assignment Nov 18, 2019
@dougal83
Copy link
Contributor

It seems that this was an ephemeral issue so closing as cannot replicate.

@emonddr
Copy link
Contributor

emonddr commented Mar 23, 2020

I had to look up ephemeral in a dictionary. lol. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI os:Windows Issues specific to Windows
Projects
None yet
Development

No branches or pull requests

6 participants