next.js icon indicating copy to clipboard operation
next.js copied to clipboard

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

Open HelloKashif opened this issue 7 years ago • 6 comments

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]

HelloKashif avatar May 21 '19 02:05 HelloKashif

I guess I had the same error, what version of firebase-tools do you have? if you have 6.10.0 try to install the 6.8.0.

https://github.com/firebase/firebase-tools/issues/1320

MatteoGioioso avatar May 22 '19 01:05 MatteoGioioso

I used 6.10. I’ll try downgrading.

HelloKashif avatar May 26 '19 00:05 HelloKashif

Hey! We'll have official support for Firebase soon, most likely by the end of next week -- just keeping you updated.

Timer avatar Jun 14 '19 15:06 Timer

Guys, are there any updates on this issue?

norrdrengr avatar Jul 05 '19 10:07 norrdrengr

Any updates for Firebase hosting guys ?

michel-p avatar Jul 12 '19 15:07 michel-p

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

balazsorban44 avatar Jan 31 '22 09:01 balazsorban44