Skip to content

pnpm and yarn2 warning auth-interop-types requires peer app-types #1327

@Leif-W

Description

@Leif-W

[REQUIRED] Step 2: Describe your environment

  • Operating System version: Android 11 / One UI 3.1 / Linux 4.19.113-21564965 / Termux 0.113
  • Firebase SDK version: 8.6.7
  • Firebase Product: admin 9.9.0
  • Node.js version: 14.15.4
  • NPM version: 7.17.0
  • pnpm version: 6.7.4
  • yarn: 1.22.10
  • yarn: 1.23.0-20210103.1434
  • yarn: 2.4.2
  • yarn: 3.0.0-rc.5

[REQUIRED] Step 3: Describe the problem

npm failed to install firebase-admin, prompting search for alternatives pnpm and yarn. Of 5 package managers, 1 installs, 2 have warnings, 2 fail to install.

  • npm fails to install
  • pnpm has warnings
  • yarn v1 installs without errors or warnings
  • yarn v2 has warnings
  • yarn v3 has too many errors, fails to install

Are there any other node package managers to try?

npm error / failure:

npm ERR! cb() never called!                                                 
npm ERR! This is an error with npm itself. Please report this error at:     npm ERR!     <https://github.com/npm/cli/issues>

npm ERR! A complete log of this run can be found in:                        npm ERR!     /data/data/com.termux/files/home/.npm/_logs/2021-06-12T00_08_10_696Z-debug.log

pnpm warning:

 WARN  firebase-admin > @firebase/database: @firebase/[email protected] requires a peer of @firebase/[email protected] but none was installed.

yarn2 warnings:

➤ YN0002: │ @firebase/database@npm:0.10.4 doesn't provide @firebase/app-types (pb2b5c), requested by @firebase/auth-interop-types

See issues/pulls related to this.

#614 (comment)
#973 (comment)
#1241 (comment)
#1250 (comment)
firebase/firebase-js-sdk#3529 (comment)

Steps to reproduce:

  1. Android 7+ (API 24)
  2. Install F-Droid (Termux not using Google Play anymore)
  3. Install Termux v0.113 or later
  4. pkg update
  5. pkg i nodejs
  6. npm i -g pnpm
  7. mkdir app-foo; cd app-foo
  8. npm init -y
  9. npm add firebase-admin
  10. rm -rf node_modules package.json ~/.npm/_logs/*.log # clean-up after done inspecting
  11. pnpm init -y
  12. pnpm add firebase-admin
  13. rm -rf node_modules pnpm-lock.yaml package.json
  14. pkg i -g yarn # npm i -g yarn fails, cb() never called!, so install yarn as a system package
  15. yarn init -y
  16. yarn set version berry; yarn set version classic # toggle from default to berry v2/3 to classic to get v1.23.0
  17. yarn add firebase-admin
  18. rm -rf .yarn* yarn.lock node_modules package.json
  19. yarn init -y
  20. yarn set version berry; yarn set version latest # newest v2 release
  21. yarn add firebase-admin
  22. rm -rf .yarn* yarn.lock .pnp.js package.json
  23. yarn init
  24. yarn set version 3.0.0-rc.5 # only works if set to berry, won't work in classic
  25. yarn add firebase-admin # too many errors, run away...

Relevant Code:

echo "See above. ☝🏻 👀"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions