Skip to content

Cant connect to firestore. #267

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
harisvsulaiman opened this issue Oct 26, 2017 · 7 comments
Closed

Cant connect to firestore. #267

harisvsulaiman opened this issue Oct 26, 2017 · 7 comments

Comments

@harisvsulaiman
Copy link

harisvsulaiman commented Oct 26, 2017

  • Operating System version: elementary os loki Linux4.13.6+
  • Firebase SDK version: 4.6.0
  • Firebase Product: firestore

Steps to reproduce:

  1. install firebase sdk
  2. start script with node node ./index.js

Error

➔ node index.js
module.js:529
    throw err;
    ^

Error: Cannot find module '/home/harisvsulaiman/node_modules/grpc/src/node/extension_binary/grpc_node.node'
    at Function.Module._resolveFilename (module.js:527:15)
    at Function.Module._load (module.js:476:23)
    at Module.require (module.js:568:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/harisvsulaiman/node_modules/grpc/src/node/src/grpc_extension.js:45:15)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)

Relevant Code:

let firebase = require("firebase");
// Required for Side Effects
require("@firebase/firestore");
require("firebase/auth");

const config = {
  apiKey: "",
  authDomain: "",
  databaseURL: "",
  projectId: ""
};

firebase.initializeApp(config);

firebase
  .firestore()
  .collection("users")
  .add({ kdskd: "dsd" })
  .then(params => {
    console.log(params);
  })
  .catch(err => {
    console.log(err);
  });
@google-oss-bot
Copy link
Contributor

Hmmm this issue does not seem to follow the issue template. Make sure you provide all the required information.

@goldensunliu
Copy link

@harisvsulaiman this is the same as issue #221
here is the temp solution I have been using: #221 (comment)
feel free to close this one

@harisvsulaiman
Copy link
Author

@goldensunliu Closing this in favour of #221

@goldensunliu
Copy link

@harisvsulaiman close?

@jshcrowthe
Copy link
Contributor

@goldensunliu @harisvsulaiman I'm assuming this was meant to be closed.

@harisvsulaiman
Copy link
Author

@jshcrowthe sorry, i forgot to close!

@alexandregiordanelli
Copy link

firestore is not working on the server side.. I have exactly this problem

@firebase firebase locked and limited conversation to collaborators Oct 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants