Next.js: Next build fails with firestore dependency in serverless mode

Created on 17 Aug 2019  路  6Comments  路  Source: vercel/next.js

Bug report

Describe the bug

When using firestore as a dependency next failed on the build step.
Hack with webpack-asset-relocator-pluging doesn't solve the issue as well, it causes another error though (gRPC binary module was not installed instead of package.json does not exist at /package.json w/o it)

To Reproduce

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

  1. Clone this repo https://github.com/eugrdn/nextjs-serverless-firestore-issue
  2. yarn install
  3. uncomment 3rd line in next.config.js
    3*. remove webpackAssetRelocator usage if needed
  4. yarn build

Expected behavior

Build step passes successfully

Screenshots

System information

  • OS: [e.g. macOS]
  • Version of Next.js: [e.g. ^9.0.3]

Additional context

https://github.com/zeit/next.js/issues/6073
https://github.com/zeit/next.js/pull/7758

Most helpful comment

Hey @timneutkens! Thanks, that's working!

All 6 comments

Hey can you try next@canary?

Do you mean next package version?
I've just tried with ^9.0.4-canary.6 and it didn't work as well

Are you deploying on Now?

Yes, but here the issue isn't with a deploy but with a build step

You'll want to set target: 'experimental-serverless-trace', the Now builder does this automatically.

Hey @timneutkens! Thanks, that's working!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wagerfield picture wagerfield  路  3Comments

swrdfish picture swrdfish  路  3Comments

jesselee34 picture jesselee34  路  3Comments

renatorib picture renatorib  路  3Comments

timneutkens picture timneutkens  路  3Comments