I am getting an error message
Build failed: npm ERR! Cannot read property 'firebase-admin' of undefined\n\nnpm ERR!
A complete log of this run can be found in:\nnpm ERR!
/www-data-home/.npm/_logs/2022-11-23T04_36_44_234Z-debug.log; Error ID: beaf8772"
Where is this www-data-home location?
CodePudding user response:
As mentioned in this documentation on Viewing logs
Logs for Cloud Functions are viewable either in the Google Cloud Console, Cloud Logging UI, or via the firebase command-line tool.
Using the Firebase CLI To view logs with the firebase tool, use the functions:log command:
firebase functions:log
To view logs for a specific function, provide the function name as an argument:
firebase functions:log --only <FUNCTION_NAME>
For the full range of log viewing options, view the help for functions:log:
firebase help functions:log
You can view logs for Cloud Functions in the Cloud Logging UI using filter as those resource types
resource.type="cloud_function"
Refer this npm docs on npm logging.
The npm CLI has various mechanisms for showing different levels of information back to end-users for certain commands, configurations & environments.
All logs are written to a debug log, with the path to that file printed if the execution of a command fails.You can find the
npm-debug.log
file in your.npm
directory. To find your.npm
directory, usenpm config get cache
.
You can also check this stackoverflow thread