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

@firebase/messaging doesn't work #3083

Closed
sacrosanctic opened this issue Dec 21, 2021 · 1 comment
Closed

@firebase/messaging doesn't work #3083

sacrosanctic opened this issue Dec 21, 2021 · 1 comment

Comments

@sacrosanctic
Copy link
Contributor

Describe the bug

There are no issues on Dev, but when I try to build it produces this error.

file:///C:/dev/test-static-messaging/node_modules/@firebase/messaging-compat/dist/esm/index.esm2017.js:5
import { onBackgroundMessage } from '@firebase/messaging/sw';
         ^^^^^^^^^^^^^^^^^^^
SyntaxError: Named export 'onBackgroundMessage' not found. The requested module '@firebase/messaging/sw' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@firebase/messaging/sw';
const { onBackgroundMessage } = pkg;

Reproduction

https://github.com/sacrosanctic/test-static-messaging

Logs

No response

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (8) x64 Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
    Memory: 2.67 GB / 15.78 GB
  Binaries:
    Node: 14.18.0 - C:\Program Files\nodejs\node.EXE 
    Yarn: 1.22.15 - ~\AppData\Roaming\npm\yarn.CMD   
    npm: 6.14.15 - C:\Program Files\nodejs\npm.CMD   
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (96.0.1054.62)
    Internet Explorer: 11.0.19041.1202
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.4     
    @sveltejs/adapter-static: ^1.0.0-next.22 => 1.0.0-next.22
    @sveltejs/kit: next => 1.0.0-next.202
    svelte: ^3.44.0 => 3.44.3

Severity

blocking an upgrade

Additional Information

No response

@benmccann benmccann changed the title adapter-static doesn't work with firebase/messaging @firebase/messaging doesn't work Dec 27, 2021
@benmccann
Copy link
Member

This is a bug in Firebase: firebase/firebase-js-sdk#5839

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

No branches or pull requests

2 participants