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

Error: Cannot find module 'p-limit' #5619

Closed
bkendall opened this issue Mar 21, 2023 · 12 comments · Fixed by #5620
Closed

Error: Cannot find module 'p-limit' #5619

bkendall opened this issue Mar 21, 2023 · 12 comments · Fixed by #5620

Comments

@bkendall
Copy link
Contributor

[REQUIRED] Environment info

firebase-tools: v11.25.0

Platform: macOS

[REQUIRED] Test case

see below

[REQUIRED] Steps to reproduce

nvm i 18 
npm i -g firebase-tools
firebase login

Turned out I was logged in - downgrading to v11.24 worked fine.

[REQUIRED] Expected behavior

Not a crash!

[REQUIRED] Actual behavior

» firebase login
node:internal/modules/cjs/loader:1078
  throw err;
  ^

Error: Cannot find module 'p-limit'
Require stack:
- /Users/bkend/.nvm/versions/node/v18.15.0/lib/node_modules/firebase-tools/lib/database/import.js
- /Users/bkend/.nvm/versions/node/v18.15.0/lib/node_modules/firebase-tools/lib/commands/database-import.js
- /Users/bkend/.nvm/versions/node/v18.15.0/lib/node_modules/firebase-tools/lib/commands/index.js
- /Users/bkend/.nvm/versions/node/v18.15.0/lib/node_modules/firebase-tools/lib/index.js
- /Users/bkend/.nvm/versions/node/v18.15.0/lib/node_modules/firebase-tools/lib/bin/firebase.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/Users/bkend/.nvm/versions/node/v18.15.0/lib/node_modules/firebase-tools/lib/database/import.js:8:19)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/Users/bkend/.nvm/versions/node/v18.15.0/lib/node_modules/firebase-tools/lib/commands/database-import.js:8:18)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/bkend/.nvm/versions/node/v18.15.0/lib/node_modules/firebase-tools/lib/database/import.js',
    '/Users/bkend/.nvm/versions/node/v18.15.0/lib/node_modules/firebase-tools/lib/commands/database-import.js',
    '/Users/bkend/.nvm/versions/node/v18.15.0/lib/node_modules/firebase-tools/lib/commands/index.js',
    '/Users/bkend/.nvm/versions/node/v18.15.0/lib/node_modules/firebase-tools/lib/index.js',
    '/Users/bkend/.nvm/versions/node/v18.15.0/lib/node_modules/firebase-tools/lib/bin/firebase.js'
  ]
}

Node.js v18.15.0
@aaronadamsCA
Copy link

Can confirm, this just broke our GitHub Actions.

@joehan
Copy link
Contributor

joehan commented Mar 21, 2023

Looks like we let a bit of code with a missing dependency slip in. Working on a patch ASAP, but in the mean time please use the previous version.

@bkendall
Copy link
Contributor Author

FWIW, if you're using FirebaseExtended/action-hosting-deploy, you can set firebaseToolsVersion to v11.24 to use the previous version.

@leonardorb
Copy link

leonardorb commented Mar 21, 2023

Yes. It broke our GitHub Actions.

Error: Cannot find module 'p-limit'
Require stack:
- /home/runner/.config/yarn/global/node_modules/firebase-tools/lib/database/import.js
- /home/runner/.config/yarn/global/node_modules/firebase-tools/lib/commands/database-import.js
- /home/runner/.config/yarn/global/node_modules/firebase-tools/lib/commands/index.js
- /home/runner/.config/yarn/global/node_modules/firebase-tools/lib/index.js
- /home/runner/.config/yarn/global/node_modules/firebase-tools/lib/bin/firebase.js

yarn global add firebase-tools@11.24.1 to not get blocked.

@shadow1349
Copy link

I'm seeing the same issue

@dustinlyons
Copy link

dustinlyons commented Mar 21, 2023

Yep, impacted. I have this in my Github Action:

curl -sL https://firebase.tools/ | bash

Any suggestions on changing this so that I'm not updating versions each time?

@andrew-delph
Copy link

ing versions eac

#5620
its being fixed

@joehan
Copy link
Contributor

joehan commented Mar 21, 2023

@dustinlyons If you want to tie to a specific version, as described on firebase.tools:

# Alternatively, you can download a specific version.
#
:   curl -Lo ./firebase_bin https://firebase.tools/bin/linux/v7.2.2

FWIW, the release job for 11.25.1 is running right now, and we are going to address the hole in our CI that let this slip through. Apologies for the trouble everyone!

@joehan joehan reopened this Mar 21, 2023
@SpencerMartel
Copy link

Same issue just accessing through the CLI, glad to see its being worked on

@joehan
Copy link
Contributor

joehan commented Mar 21, 2023

11.25.1 has been released with a fix for this issue. Apologies everyone!

@joehan joehan closed this as completed Mar 21, 2023
@SpencerMartel
Copy link

Fixes it for me, I appreciate the quick response to the issue!! @joehan

@dustinlyons
Copy link

Thank you for the quick response!

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

Successfully merging a pull request may close this issue.

8 participants