Skip to content

Cannot build next with firebase when serverless mode selected in next.config.js #7391

Closed
@HelloKashif

Description

@HelloKashif

Bug report

Cannot build next with firebase when serverless mode selected in next.config.js

Describe the bug

While building we get this error if we try to use firebase and serverless mode is turned on.

Error: package.json does not exist at /package.json

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Install firebase in your project
  2. Set mode:'serverless' in next.config.js
  3. Do 'import * as firebase from "firebase/app"' and 'import firebase/firestore' in any page
  4. do next build
  5. Result: Error: package.json does not exist at /package.json

Expected behavior

I'm expecting this to build. And since Zeit Now 2.0 only allows serverless next deployment this error makes it impossible to use now2.0

System information

  • OS: [Windows]
  • Version of Next.js: [8.1.0]

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions