google-home / smarthome-local

https://codelabs.developers.google.com/codelabs/smarthome-local
Apache License 2.0
28 stars 17 forks source link

cannot deploy function (TypeError: instance.INTERNAL.registerComponent is not a function) #6

Closed chadstick closed 4 years ago

chadstick commented 4 years ago

Getting this error when I try to deploy:

TypeError: instance.INTERNAL.registerComponent is not a function at registerDatabase (C:\Users\chad_\sh\app-start\functions\nodemodules\@firebase\database\dist\index.node.cjs.js:15393:39) at Object. (C:\Users\chad\sh\app-start\functions\node_modules\@firebase\database\dist\index.node.cjs.js:15426:5) at Module._compile (internal/modules/cjs/loader.js:701:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) at Module.load (internal/modules/cjs/loader.js:600:32) at tryModuleLoad (internal/modules/cjs/loader.js:539:12) at Function.Module.load (internal/modules/cjs/loader.js:531:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at FirebaseNamespace.get [as database] (C:\Users\chad\sh\app-start\functions\node_modules\firebase-admin\lib\firebase-namespace.js:282:38)

Fleker commented 4 years ago

Can you try installing @firebase/app in your functions directory?

npm install @firebase/app --save

chadstick commented 4 years ago

Yup, that worked. Thanks again Nick!