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.
My goal is to be able to locally test my firestore functions which are all written in an index.js file. For context, I had permissions errors when first attempting to run the shell, and so I wiped node/npm from my system, installed nvm and then installed node/npm via that so the permission errors are now gone, aside from this one.
i functions: Preparing to emulate functions.
Error: EACCES: permission denied, open '/Users/brandontrautmann/.config/configstore/@google-cloud/functions-emulator/.functions.json'
You don't have access to this file.
at Error (native)
at Object.fs.openSync (fs.js:642:18)
at Object.fs.readFileSync (fs.js:510:33)
at Configstore.get all [as all] (/Users/brandontrautmann/.nvm/versions/node/v6.11.5/lib/node_modules/firebase-tools/node_modules/@google-cloud/functions-emulator/node_modules/configstore/index.js:29:25)
at new Configstore (/Users/brandontrautmann/.nvm/versions/node/v6.11.5/lib/node_modules/firebase-tools/node_modules/@google-cloud/functions-emulator/node_modules/configstore/index.js:25:46)
at new ConfigAdapter (/Users/brandontrautmann/.nvm/versions/node/v6.11.5/lib/node_modules/firebase-tools/node_modules/@google-cloud/functions-emulator/src/model/functions.js:43:23)
at new Functions (/Users/brandontrautmann/.nvm/versions/node/v6.11.5/lib/node_modules/firebase-tools/node_modules/@google-cloud/functions-emulator/src/model/functions.js:136:22)
at Object.exports.functions (/Users/brandontrautmann/.nvm/versions/node/v6.11.5/lib/node_modules/firebase-tools/node_modules/@google-cloud/functions-emulator/src/model/index.js:22:34)
at new Emulator (/Users/brandontrautmann/.nvm/versions/node/v6.11.5/lib/node_modules/firebase-tools/node_modules/@google-cloud/functions-emulator/src/emulator/emulator.js:27:29)
at Object.main (/Users/brandontrautmann/.nvm/versions/node/v6.11.5/lib/node_modules/firebase-tools/node_modules/@google-cloud/functions-emulator/src/emulator/main.js:120:20)
⚠ functions: Error from emulator. Error: Emulator crashed! Check the log file...
No functions emulated.
Troubleshooting
If run firebase experimental:functions:shell with sudo, this error is thrown:
i functions: Preparing to emulate functions.
⚠ functions: Failed to emulate Error
No functions emulated.
If I try to follow the emulator docs Troubleshooting and run the following:
npm uninstall -g @google-cloud/functions-emulator
npm uninstall -g firebase-tools
npm cache clean
node -v (verify this outputs v6.11.1 or newer)
npm install -g firebase-tools (this will re-install the Emulator)
I get the same error. If I try to install the emulator directly via npm install -g @google-cloud/functions-emulator I receive:
ERROR: Error: Emulator crashed! Check the log file...
at ChildProcess.child.on (/Users/brandontrautmann/.nvm/versions/node/v6.11.5/lib/node_modules/@google-cloud/functions-emulator/src/cli/controller.js:646:24)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:219:12)
Any help would be greatly appreciated, thank you.
The text was updated successfully, but these errors were encountered:
The issue was that even after fixing npm and Node installations, firebase folders I had created with the bad installation were still owned by root. I needed to chown the directories to fix the issue and now do not have any other problems.
My goal is to be able to locally test my firestore functions which are all written in an
index.js
file. For context, I had permissions errors when first attempting to run the shell, and so I wiped node/npm from my system, installed nvm and then installed node/npm via that so the permission errors are now gone, aside from this one.Environment details
Steps to reproduce
nvm use v6.11.5
to ensure compatibilityNamely:
npm install --save firebase-functions@latest
npm install -g firebase-tools
firebase experimental:functions:shell
Troubleshooting
firebase experimental:functions:shell
with sudo, this error is thrown:npm uninstall -g @google-cloud/functions-emulator
npm uninstall -g firebase-tools
npm cache clean
node -v (verify this outputs v6.11.1 or newer)
npm install -g firebase-tools (this will re-install the Emulator)
I get the same error. If I try to install the emulator directly via
npm install -g @google-cloud/functions-emulator
I receive:Any help would be greatly appreciated, thank you.
The text was updated successfully, but these errors were encountered: