Skip to content

Google pubsub in react project. #2776

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
lafeber opened this issue Dec 14, 2017 · 1 comment
Closed

Google pubsub in react project. #2776

lafeber opened this issue Dec 14, 2017 · 1 comment
Assignees
Labels
type: question Request for information or clarification. Not an issue. web

Comments

@lafeber
Copy link

lafeber commented Dec 14, 2017

As soon as I include

var pubsub = require('@google-cloud/pubsub')

in my react project, I get the error:

TypeError: existsSync is not a function
./node_modules/grpc/node_modules/node-pre-gyp/lib/pre-binding.js.exports.find
node_modules/grpc/node_modules/node-pre-gyp/lib/pre-binding.js:16
  13 | };
  14 | 
  15 | exports.find = function(package_json_path,opts) {
> 16 |    if (!existsSync(package_json_path)) {
  17 |         throw new Error("package.json does not exist at " + package_json_path);
  18 |    }
  19 |    var package_json = require(package_json_path);

I'm relatively new to react, and debugging it doesn't seem as nice as in ruby projects. Any ideas?

EDIT: probably related to: #2664

@stephenplusplus
Copy link
Contributor

Hey @lafeber, you indeed found the issue I was going to re-route to. We don't have any official support for these external environments (the browser, React Native, etc).

If we do eventually get this on the roadmap, we will update those issues.

@stephenplusplus stephenplusplus added the type: question Request for information or clarification. Not an issue. label Dec 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Request for information or clarification. Not an issue. web
Projects
None yet
Development

No branches or pull requests

3 participants