question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

firebase login fails running under WSL

See original GitHub issue

[REQUIRED] Environment info

firebase-tools: 7.2.0

Platform: debian over WSL1

[REQUIRED] Test case

firebase login fails when running under WSL.

[REQUIRED] Steps to reproduce

  • install WSL (Debian)
  • install node 12.7.0
  • install firebase-tools using npm
  • run firebase login

[REQUIRED] Expected behavior

Expected to listen on local port.

[REQUIRED] Actual behavior

$ firebase login --debug

[2019-07-25T03:53:52.524Z] ----------------------------------------------------------------------
[2019-07-25T03:53:52.532Z] Command:       /usr/bin/node /usr/bin/firebase login --debug
[2019-07-25T03:53:52.532Z] CLI Version:   7.2.0
[2019-07-25T03:53:52.533Z] Platform:      linux
[2019-07-25T03:53:52.535Z] Node Version:  v12.7.0
[2019-07-25T03:53:53.767Z] Time:          Thu Jul 25 2019 13:53:52 GMT+1000 (GMT+10:00)
[2019-07-25T03:53:53.768Z] ----------------------------------------------------------------------

? Allow Firebase to collect anonymous CLI usage and error reporting information? Yes

Visit this URL on any device to log in:
(omitted)

Waiting for authentication...
[2019-07-25T03:53:55.869Z] Error: spawn cmd.exe ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:77:11)

Error: An unexpected error has occurred.

firebase-tools attempts to spawn cmd.exe, which doesn’t exist. If I were to guess, it thinks it’s running under Windows.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

15reactions
Galzkcommented, Sep 27, 2019

Try this if you face the same issue PATH="$PATH:/mnt/c/Windows/System32" firebase login

8reactions
shaneqldcommented, Jul 30, 2019

Taking a further look into this, it seems open package invokes cmd.exe which it expects is on the PATH environment variable. Adding /mnt/c/Windows/system32 to PATH resolves the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found