Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find module '@google-cloud/logging'

I am new in firebase Functions. In my functions/index.js I defined :

const Logging = require('@google-cloud/logging');

When I run firebase deploy --debug , I constantly get error:

 Error parsing triggers: Cannot find module '@google-cloud/logging'

Why I get this error???

(BTW, in the firebase init , I selected Functions: enter image description here)

like image 889
Leem Avatar asked Jan 28 '18 15:01

Leem


1 Answers

You can't use a module until you install it into your project and it appears in your package.json. Run this in your functions folder:

npm install @google-cloud/logging
like image 147
Doug Stevenson Avatar answered Oct 12 '22 22:10

Doug Stevenson