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

Files missing in firebase@9.15.0 #6887

Closed
jwalton opened this issue Dec 14, 2022 · 3 comments
Closed

Files missing in firebase@9.15.0 #6887

jwalton opened this issue Dec 14, 2022 · 3 comments

Comments

@jwalton
Copy link

jwalton commented Dec 14, 2022

Describe your environment

  • Operating System version: MacOS 13.0
  • Browser version: Any
  • Firebase SDK version: 9.15.0
  • Firebase Product: auth, possibly others

Describe the problem

Steps to reproduce:

$ npm install firebase@9.14.0
$ ls node_modules/firebase/auth/dist
analytics        auth             firestore        index.cjs.js.map index.mjs        messaging        storage
app              compat           functions        index.esm.js     index.mjs.map    performance
app-check        database         index.cjs.js     index.esm.js.map installations    remote-config

$ npm install firebase@9.15.0
$ ls node_modules/firebase/auth/dist
analytics        auth             esm              index.cjs.js     index.mjs.map    performance
app              compat           firestore        index.cjs.js.map installations    remote-config
app-check        database         functions        index.mjs        messaging        storage

Note that index.esm.js is missing, however this file is still referenced in node_modules/firebase/auth/package.json:

$ cat node_modules/firebase/auth/package.json
{
  "name": "firebase/auth",
  "main": "dist/index.cjs.js",
  "browser": "dist/esm/index.esm.js",
  "module": "dist/esm/index.esm.js",
  "typings": "dist/auth/index.d.ts"
}

As a result, if you for example import { getAuth } from 'firebase/auth'; and you use an ESM-based bundler like vite, then the build will work in 9.14.0, but fail in 9.15.0.

@hsubox76
Copy link
Contributor

The path is in package.json is dist/esm/index.esm.js, note the esm subdirectory, which I do see in your ls results. Does the file exist in that subdirectory?

If so, and the build is still failing, can you share the error message and a minimal repro of the project it won't build in?

@hsubox76
Copy link
Contributor

Note to self, possibly caused by #6826

@jwalton
Copy link
Author

jwalton commented Dec 15, 2022

My humble appologies. I'm afraid I'm unable to reproduce this. I'm 99% sure that what happened here is, I had left a vite serve open in a shell, I upgraded to the latest firebase, and the vite started complaining that node_modules/firebase/auth/dist/index.esm.js couldn't be found. I had just merged a lockfile maintenance PR from renovate, so I tried downgrading firebase and of course this fixed the problem (and the file was back!). But the real problem was that I needed to restart my vite server.

So sorry for jumping the gun and opening an issue. :(

@jwalton jwalton closed this as completed Dec 15, 2022
@firebase firebase locked and limited conversation to collaborators Jan 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants