Skip to content
This repository has been archived by the owner on May 15, 2019. It is now read-only.

Error: EACCES: permission denied #195

Closed
santhoshdc1590 opened this issue Mar 8, 2018 · 1 comment
Closed

Error: EACCES: permission denied #195

santhoshdc1590 opened this issue Mar 8, 2018 · 1 comment

Comments

@santhoshdc1590
Copy link

Hi

I am not using firebase.
I did search online for similar problems, but couldn't find any

Environment details

  • OS: macOS Sierra, version 10.12.4
  • Node.js version: v9.7.1
  • npm version: 5.6.0
  • @google-cloud/functions-emulator version:1.0.0-beta.4

Steps to reproduce

How to get started?

completed Step1

Step2 npm install -g @google-cloud/functions-emulatorgave permission error so installed using npm install @google-cloud/functions-emulator

this was the output of the after Step2

> @google-cloud/functions-emulator@1.0.0-beta.4 postinstall /Users/name/Documents/helloworld/node_modules/@google-cloud/functions-emulator
> node scripts/upgrade-warning


If you're using the Emulator via the Firebase CLI, you can
disregard this message.

If you're upgrading @google-cloud/functions-emulator, these
are the recommended upgrade steps:

1.  Stop the currently running emulator, if any:

        functions stop

2.  Uninstall the current emulator, if any:

        npm uninstall -g @google-cloud/functions-emulator

3.  Install the new version of the emulator:

        npm install -g @google-cloud/functions-emulator

If you have trouble after upgrading, try deleting the config
directory found in:

    ~/.config/configstore/@google-cloud/functions-emulator

Then restart the emulator. You can also check for any renegade
Node.js emulator processes that may need to be killed:

    ps aux | grep node

npm WARN saveError ENOENT: no such file or directory, open '/Users/name/Documents/helloworld/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/Users/name/Documents/helloworld/package.json'
npm WARN helloworld No description
npm WARN helloworld No repository field.
npm WARN helloworld No README data
npm WARN helloworld No license field.

+ @google-cloud/functions-emulator@1.0.0-beta.4
added 310 packages in 29.534s

Step3 used functions start

I got this big error message

Warning: You're using Node.js v9.7.1 but Google Cloud Functions only supports v6.11.5.
{ Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@google-cloud/functions-emulator/logs'
    at Object.fs.mkdirSync (fs.js:909:18)
    at Object.assertLogsPath (/usr/local/lib/node_modules/@google-cloud/functions-emulator/src/emulator/logs.js:65:10)
    at new Controller (/usr/local/lib/node_modules/@google-cloud/functions-emulator/src/cli/controller.js:77:32)
    at Object.exports.handler (/usr/local/lib/node_modules/@google-cloud/functions-emulator/src/cli/commands/start.js:75:22)
    at Object.runCommand (/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/yargs/lib/command.js:235:44)
    at Object.parseArgs [as _parseArgs] (/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/yargs/yargs.js:1014:30)
    at Object.parse (/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/yargs/yargs.js:542:25)
    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:104:27)
    at <anonymous>
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path: '/usr/local/lib/node_modules/@google-cloud/functions-emulator/logs' }

Confused! any guidance i'm new to this

Thanks!

@santhoshdc1590
Copy link
Author

santhoshdc1590 commented Mar 8, 2018

Followed the instructions to install nvm properly here then install node.js as mentioned here

Everything worked smoothly

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant