vercel: `firebase-admin` it does not work

NOTE: now-dev It is available in the canary version of now cli

Steps to reproduce 🐛

git clone https://github.com/MAPESO/now-dev-bug-firebase
cd now-dev-bug-firebase
yarn install  # dependency installation
now dev # note the error output

This problem was ncc but it was resolved in this PR https://github.com/zeit/webpack-asset-relocator-loader/pull/12. Even though it now works in ncc the problem still persists innow and now dev

logs

Error: package.json does not exist at /private
54972002-0cf67580-4f4f-11e9-949e-62fecb026376

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 6
  • Comments: 17 (9 by maintainers)

Most upvoted comments

This is working for me in 15.1.0, although I don’t know which version it was fixed in. I’m getting these warnings/errors in the terminal, but they don’t seem to cause any issues:

ncc: Module directory "/private/var/folders/qs/rgfhf56n7pddh_nzcb6ljllh0000gp/T/co.zeit.now/dev/workPaths/sgkdk5vo/node_modules/@firebase/database/dist" attempted to require "request" but could not be resolved, assuming external.
ncc: Module directory "/private/var/folders/qs/rgfhf56n7pddh_nzcb6ljllh0000gp/T/co.zeit.now/dev/workPaths/sgkdk5vo/node_modules/hash-stream-validation" attempted to require "fast-crc32c" but could not be resolved, assuming external.
ncc: Module directory "/private/var/folders/qs/rgfhf56n7pddh_nzcb6ljllh0000gp/T/co.zeit.now/dev/workPaths/sgkdk5vo/node_modules/retry-request" attempted to require "request" but could not be resolved, assuming external.
ncc: Module directory "/private/var/folders/qs/rgfhf56n7pddh_nzcb6ljllh0000gp/T/co.zeit.now/dev/workPaths/sgkdk5vo/node_modules/write-file-atomic" attempted to require "worker_threads" but could not be resolved, assuming external.
ncc: Module directory "/private/var/folders/qs/rgfhf56n7pddh_nzcb6ljllh0000gp/T/co.zeit.now/dev/workPaths/sgkdk5vo/node_modules/google-gax/build/src" attempted to require "@grpc/grpc-js" but could not be resolved, assuming external.
ncc: Module directory "/private/var/folders/qs/rgfhf56n7pddh_nzcb6ljllh0000gp/T/co.zeit.now/dev/workPaths/sgkdk5vo/node_modules/google-gax/build/src" attempted to require "@grpc/grpc-js" but could not be resolved, assuming external.
ncc: Module directory "/private/var/folders/qs/rgfhf56n7pddh_nzcb6ljllh0000gp/T/co.zeit.now/dev/workPaths/sgkdk5vo/node_modules/bytebuffer/dist" attempted to require "memcpy" but could not be resolved, assuming external.

If it’s not important, is there a way to silence the message?

works with now dev or now ? I’m aware that in ncc it works

It’s working for me with both now dev and now. I’m using it to read and write to Firebase’s Firestore and Storage products.

@betsegaw

Seems to be fixed as of 15.0.9-canary.1.

I need more information 🙏

@MAPESO another thing you might check here is if node_modules/google-gax and node_modules/google-proto-files both exist.

@MAPESO yes it did and I was able to get a reply from local queries just fine. Will try to put together a sample and send it your way. I am using it currently on a private repo so I can’t link directly to my project but yeah, latest canary version seems to work for me.