Skip to content

"Can't resolve encoding" warning in the console when used with Next JS 13.4 #7280

Closed
@raajnadar

Description

@raajnadar

[REQUIRED] Describe your environment

  • Operating System version: Mac OS X
  • Browser version: latest Chromium
  • Firebase SDK version: 9.21.0
  • Firebase Product: auth (auth, database, storage, etc)

[REQUIRED] Describe the problem

Steps to reproduce:

You need to import the package in a newly created next js application & run the application in the dev

- warn ../node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '<path>/node_modules/node-fetch/lib'
 
Import trace for requested module:
../node_modules/node-fetch/lib/index.js
../node_modules/@firebase/auth/dist/node-esm/index.js
../node_modules/firebase/auth/dist/index.mjs
./context/AuthProvider.tsx
./app/root-layout.tsx

Relevant Code:

import { getAuth } from 'firebase/auth'

export const auth = getAuth()

The solution is to use the new version of node fetch in https://github.com/firebase/firebase-js-sdk/blob/master/packages/auth/package.json

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions