I am trying to deploy my functions on the cloud functions emulator but my terminal throws me this error:
$ functions deploy sendNotifications --trigger-http
{ Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@google-cloud/functions-emulator/logs' at Error (native) at Object.fs.mkdirSync (fs.js:922:18) at Object.assertLogsPath (/usr/local/lib/node_modules/@google-cloud/functions-emulator/src/emulator/logs.js:31:10) at new Controller (/usr/local/lib/node_modules/@google-cloud/functions-emulator/src/cli/controller.js:84:32) at Object.exports.handler (/usr/local/lib/node_modules/@google-cloud/functions-emulator/src/cli/commands/deploy.js:124:22) at Object.self.runCommand (/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/yargs/lib/command.js:231:22) at Object.Yargs.self._parseArgs (/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/yargs/yargs.js:989:30) at Object.Yargs.self.parse (/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/yargs/yargs.js:533:23) at Object.main (/usr/local/lib/node_modules/@google-cloud/functions-emulator/src/cli/main.js:69:6) at getProjectId.then (/usr/local/lib/node_modules/@google-cloud/functions-emulator/bin/functions:100:27) errno: -13, code: 'EACCES', syscall: 'mkdir', path: '/usr/local/lib/node_modules/@google-cloud/functions-emulator/logs' }
I have cd-ed to the functions directory and checked that I am logged in to firebase and selected the right project Id. Am i doing something wrongly?