You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 15, 2019. It is now read-only.
It seems that cloud-function-emulator tries to write logs to a location relative to where it's installed.
If node.js is installed using APT, then npm -g install firebase-tools must be run as root and will install cloud-functions-emulator to /usr/lib/node_modules/firebase-tools/node_modules/@google-cloud/functions-emulator which is not writable by normal users.
Since the "logs" path is relative to this directory, mkdirSync will just fail on this line with EACCES: permission denied:
(related to #195)
It seems that
cloud-function-emulator
tries to write logs to a location relative to where it's installed.If node.js is installed using APT, then
npm -g install firebase-tools
must be run as root and will installcloud-functions-emulator
to/usr/lib/node_modules/firebase-tools/node_modules/@google-cloud/functions-emulator
which is not writable by normal users.Since the "logs" path is relative to this directory, mkdirSync will just fail on this line with
EACCES: permission denied
:https://github.com/GoogleCloudPlatform/cloud-functions-emulator/blob/6dbd88345f6f7d129644d2547d949aaf36897fd0/src/emulator/logs.js#L65
Environment details
Steps to reproduce
sudo apt-get install -y nodejs
npm -g install firebase-tools
firebase serve
anywhere results inError: An unexpected error has occurred.
because of the EACCES exception thrown bycloud-function-emulator
A simple fix is just creating the logs folder manually, but would be great if it used a different folder by default:
The text was updated successfully, but these errors were encountered: