Skip to content
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

util.patchProperty is not a function #2153

Closed
zachheine opened this issue Sep 5, 2019 · 3 comments
Closed

util.patchProperty is not a function #2153

zachheine opened this issue Sep 5, 2019 · 3 comments

Comments

@zachheine
Copy link

STACK TRACE:
7:37:25 PM: {"message":"util.patchProperty is not a function","locations":[{"line":2,"column":3}],"path":["plan"],"extensions":{"code":"INTERNAL_SERVER_ERROR","exception":{"stacktrace":["TypeError: util.patchProperty is not a function"," at createFirebaseNamespaceCore (/var/task/node_modules/firebase-admin/node_modules/@firebase/app/dist/index.node.cjs.js:292:10)"," at createFirebaseNamespace (/var/task/node_modules/firebase-admin/node_modules/@firebase/app/dist/index.node.cjs.js:447:21)"," at Object. (/var/task/node_modules/firebase-admin/node_modules/@firebase/app/dist/index.node.cjs.js:476:17)"," at Module._compile (module.js:652:30)"," at Object.Module._extensions..js (module.js:663:10)"," at Module.load (module.js:565:32)"," at tryModuleLoad (module.js:505:12)"," at Function.Module._load (module.js:497:3)"," at Module.require (module.js:596:17)"," at require (internal/module.js:11:18)"]}}}

  • Operating System version: Netlify functions (Node.js 8.10) on AWS
  • Browser version: n/a
  • Firebase SDK version: "firebase": "^6.5.0"
  • Firebase Product: realtime database

[REQUIRED] Describe the problem

Not sure I can; this runs fine locally (using "netlify-lambda": "^1.6.3") but when it is uploaded run on Netlify/AWS it throws this error.

@google-oss-bot
Copy link
Contributor

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@Feiyang1
Copy link
Member

Feiyang1 commented Sep 6, 2019

util.patchProperty was removed since 6.2.0. It appears you have incompatible version of @firebase/app and @firebase/util. Perhaps your AWS environment has outdated node_modules?

Please make sure you only have a single firebase dependency in your package.json, then do a clean install in the server environment. It should clear the issue for you.

@Feiyang1 Feiyang1 closed this as completed Sep 6, 2019
@zachheine
Copy link
Author

Thanks @Feiyang1. I downgraded to [email protected] and it runs now. The AWS lambda environment only supports Node 8.10 so I think the incompatibility may have been there somehow. I also have firebase (currently ^6.5.0) in the repository because the client uses it but I don't think that gets bundled into what the lambda runs.

@firebase firebase locked and limited conversation to collaborators Oct 8, 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

3 participants