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

Standalone CLI requires 'semver' module #1684

Closed
vinceis1337 opened this issue Sep 30, 2019 · 7 comments
Closed

Standalone CLI requires 'semver' module #1684

vinceis1337 opened this issue Sep 30, 2019 · 7 comments
Assignees

Comments

@vinceis1337
Copy link

vinceis1337 commented Sep 30, 2019

[REQUIRED] Environment info

firebase-tools:

pkg/prelude/bootstrap.js:1185
      throw error;
      ^

Error: Cannot find module 'semver'
1) If you want to compile the package/file into executable, please pay attention to compilation warnings and specify a literal in 'require' call. 2) If you don't want to compile the package/file into executable and want to 'require' it from filesystem (likely plugin), specify an absolute path in 'require' call using process.cwd() or process.execPath.
    at Function.Module._resolveFilename (module.js:546:15)
    at Function.Module._resolveFilename (pkg/prelude/bootstrap.js:1287:46)
    at Function.Module._load (module.js:473:25)
    at Module.require (module.js:595:17)
    at Module.require (pkg/prelude/bootstrap.js:1166:31)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/l145680/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/bin/firebase.js:3:14)
    at Module._compile (module.js:651:30)
    at Module._compile (pkg/prelude/bootstrap.js:1222:32)
    at Object.Module._extensions..js (module.js:662:10)

EDIT: Coworker (he has npm) ran the --version command and got 7.4.0

Platform:
MacOS Mojave
Version 10.14.6 (18G95)

[REQUIRED] Test case

  • Using the standalone binary OR Using the auto install script (curl -sL firebase.tools | bash)
  • Without npm
  • Causes the binary to error out

[REQUIRED] Steps to reproduce

Precondition:

  1. Do not have npm installed.

Steps:
1a. Download the standalone binary
or
1b. Use the auto install script (curl -sL firebase.tools | bash)

  1. Attempt to run any firebase command (i.e. firebase --version)
  2. Receive Error: Cannot find module 'semver'

[REQUIRED] Expected behavior

Standalone binary can execute commands

[REQUIRED] Actual behavior

Standalone binary requires npm.
Log for firebase --version --debug is the same as firebase --version.

pkg/prelude/bootstrap.js:1185
      throw error;
      ^

Error: Cannot find module 'semver'
1) If you want to compile the package/file into executable, please pay attention to compilation warnings and specify a literal in 'require' call. 2) If you don't want to compile the package/file into executable and want to 'require' it from filesystem (likely plugin), specify an absolute path in 'require' call using process.cwd() or process.execPath.
    at Function.Module._resolveFilename (module.js:546:15)
    at Function.Module._resolveFilename (pkg/prelude/bootstrap.js:1287:46)
    at Function.Module._load (module.js:473:25)
    at Module.require (module.js:595:17)
    at Module.require (pkg/prelude/bootstrap.js:1166:31)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/l145680/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/bin/firebase.js:3:14)
    at Module._compile (module.js:651:30)
    at Module._compile (pkg/prelude/bootstrap.js:1222:32)
    at Object.Module._extensions..js (module.js:662:10)
@samtstern
Copy link
Contributor

Assigning this to standalone CLI czar @abeisgoat to take a look, thanks for filing!

@brotherdetjr
Copy link

Exactly the same behaviour, even if I install node.
OS: elementary OS 0.4.1 Loki (Ubuntu 16.04.5 LTS)

@abeisgoat
Copy link
Contributor

I think this was a result of a faulty build, if you can still reproduce this with a recent firebase@7.8.1 release, please re-open.

@vinceis1337
Copy link
Author

Thanks @abeisgoat, confirming that latest firebase-tools@7.8.1 build works properly.

Leaving closed.

@FrostyAnimations126
Copy link

I get the exact same error, and I downloaded and ran the standalone binary yesterday

@TiffApps
Copy link

Exactly the same issue with latest instant version (12.4.5) on Windows 10, with Node 19.4.0 installed. If I try the normal one (for Node), it instantly closes itself after opening it.

@MuzammilNawazKhanNiazi
Copy link

Well, ultimate solution [for standalone CLI file] is to place the file in your Admin user profile and after opening the file it will automatically start configuring all the files,

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

No branches or pull requests

7 participants