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

node .\examples\password.js just hang on windows 10 #643

Closed
s50600822 opened this issue Jan 30, 2018 · 2 comments
Closed

node .\examples\password.js just hang on windows 10 #643

s50600822 opened this issue Jan 30, 2018 · 2 comments

Comments

@s50600822
Copy link

s50600822 commented Jan 30, 2018

PS C:\Users\hoaphan\Inquirer.js> node .\examples\password.js
(node:2112) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: cb is not a function
(node:2112) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

and it just hangs there.

In more detail:

PS C:\Users\hoaphan\Inquirer.js> node --trace-warnings .\examples\password.js
(node:1288) TypeError: cb is not a function
    at module.exports (C:\Users\hoaphan\node_modules\run-async\index.js:23:5)
    at PasswordPrompt.handleSubmitEvents (C:\Users\hoaphan\Inquirer.js\lib\prompts\base.js:87:20)
    at PasswordPrompt._run (C:\Users\hoaphan\Inquirer.js\lib\prompts\password.js:35:27)
    at resolve (C:\Users\hoaphan\Inquirer.js\lib\prompts\base.js:54:12)
    at new Promise (<anonymous>)
    at PasswordPrompt.run (C:\Users\hoaphan\Inquirer.js\lib\prompts\base.js:53:12)
    at DeferSubscriber.Rx.Observable.defer [as factory] (C:\Users\hoaphan\Inquirer.js\lib\ui\prompt.js:84:27)
    at DeferSubscriber._callFactory (C:\Users\hoaphan\node_modules\rxjs\observable\DeferObservable.js:92:27)
    at DeferSubscriber.tryDefer (C:\Users\hoaphan\node_modules\rxjs\observable\DeferObservable.js:85:18)
    at new DeferSubscriber (C:\Users\hoaphan\node_modules\rxjs\observable\DeferObservable.js:81:14)
(node:1288) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
    at emitWarning (internal/process/promises.js:78:15)
    at emitPendingUnhandledRejections (internal/process/promises.js:95:11)
    at runMicrotasksCallback (internal/process/next_tick.js:124:9)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)
    at Function.Module.runMain (module.js:686:11)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
PS C:\Users\hoaphan\Inquirer.js> node --version
v8.9.4

PS C:\Users\hoaphan\Inquirer.js> [System.Environment]::OSVersion.Version
Major  Minor  Build  Revision
-----  -----  -----  --------
10     0      16299  0
@s50600822
Copy link
Author

nvm, it seems my npm went rouge

PS C:\Users\hoaphan\Inquirer.js> npm list
inquirer@5.0.1 C:\Users\hoaphan\Inquirer.js
+-- UNMET DEPENDENCY ansi-escapes@^3.0.0
+-- UNMET DEPENDENCY chalk@^2.0.0
+-- UNMET DEPENDENCY cli-cursor@^2.1.0
+-- UNMET DEPENDENCY cli-width@^2.0.0
+-- UNMET DEPENDENCY external-editor@^2.1.0
+-- UNMET DEPENDENCY figures@^2.0.0
+-- UNMET DEPENDENCY lodash@^4.3.0
+-- UNMET DEPENDENCY mute-stream@0.0.7
+-- UNMET DEPENDENCY run-async@^2.2.0
+-- UNMET DEPENDENCY rxjs@^5.5.2
+-- UNMET DEPENDENCY string-width@^2.1.0
+-- UNMET DEPENDENCY strip-ansi@^4.0.0
`-- UNMET DEPENDENCY through@^2.3.6

npm ERR! missing: ansi-escapes@^3.0.0, required by inquirer@5.0.1
npm ERR! missing: chalk@^2.0.0, required by inquirer@5.0.1
npm ERR! missing: cli-cursor@^2.1.0, required by inquirer@5.0.1
npm ERR! missing: cli-width@^2.0.0, required by inquirer@5.0.1
npm ERR! missing: external-editor@^2.1.0, required by inquirer@5.0.1
npm ERR! missing: figures@^2.0.0, required by inquirer@5.0.1
npm ERR! missing: lodash@^4.3.0, required by inquirer@5.0.1
npm ERR! missing: mute-stream@0.0.7, required by inquirer@5.0.1
npm ERR! missing: run-async@^2.2.0, required by inquirer@5.0.1
npm ERR! missing: rxjs@^5.5.2, required by inquirer@5.0.1
npm ERR! missing: string-width@^2.1.0, required by inquirer@5.0.1
npm ERR! missing: strip-ansi@^4.0.0, required by inquirer@5.0.1
npm ERR! missing: through@^2.3.6, required by inquirer@5.0.1

npm update fixed it

PS C:\Users\hoaphan\Inquirer.js> npm update
npm notice created a lockfile as package-lock.json. You should commit this file.
+ cli-cursor@2.1.0
+ ansi-escapes@3.0.0
+ external-editor@2.1.0
+ chalk@2.3.0
+ mute-stream@0.0.7
+ lodash@4.17.4
+ figures@2.0.0
+ run-async@2.3.0
+ rxjs@5.5.6
+ cli-width@2.2.0
+ string-width@2.1.1
+ strip-ansi@4.0.0
+ through@2.3.8
added 31 packages in 2.947s
PS C:\Users\hoaphan\Inquirer.js> npm list
inquirer@5.0.1 C:\Users\hoaphan\Inquirer.js
+-- ansi-escapes@3.0.0
+-- chalk@2.3.0
| +-- ansi-styles@3.2.0
| | `-- color-convert@1.9.1
| |   `-- color-name@1.1.3
| +-- escape-string-regexp@1.0.5
| `-- supports-color@4.5.0
|   `-- has-flag@2.0.0
+-- cli-cursor@2.1.0
| `-- restore-cursor@2.0.0
|   +-- onetime@2.0.1
|   | `-- mimic-fn@1.1.0
|   `-- signal-exit@3.0.2
+-- cli-width@2.2.0
+-- external-editor@2.1.0
| +-- chardet@0.4.2
| +-- iconv-lite@0.4.19
| `-- tmp@0.0.33
|   `-- os-tmpdir@1.0.2
+-- figures@2.0.0
| `-- escape-string-regexp@1.0.5 deduped
+-- lodash@4.17.4
+-- mute-stream@0.0.7
+-- run-async@2.3.0
| `-- is-promise@2.1.0
+-- rxjs@5.5.6
| `-- symbol-observable@1.0.1
+-- string-width@2.1.1
| +-- is-fullwidth-code-point@2.0.0
| `-- strip-ansi@4.0.0 deduped
+-- strip-ansi@4.0.0
| `-- ansi-regex@3.0.0
`-- through@2.3.8

PS C:\Users\hoaphan\Inquirer.js> node --trace-warnings .\examples\password.js
? Enter a password [input is hidden]

@mems
Copy link

mems commented Feb 27, 2018

Remove package-lock.json and npm install fix the issue for me (related to when an old run-async version is already installed)

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

No branches or pull requests

3 participants