I am getting an EACCES error when running npm install -g firebase-tools
, my package.json
:
{
"name": "ZiA-Chat",
"version": "0.0.1",
"description": "In-development Chat App",
"main": "server.js",
"scripts": {
"start": "node server.js"
},
"dependencies": {
"express": "^4.17.1",
"socket.io": "^2.3.0",
"firebase": "^7.9.2"
},
"engines": {
"node": "12.x"
},
"license": "MIT"
}
The console:
app@zia:~ 22:29
$ npm install -g firebase-tools
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v12.0.0/lib/node_modules
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/firebase-tools/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! path /opt/nvm/versions/node/v12.0.0/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/opt/nvm/versions/node/v12.0.0/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/opt/nvm/versions/node/v12.0.0/lib/node_modules'] {
npm ERR! stack: 'Error: EACCES: permission denied, access ' +
npm ERR! "'/opt/nvm/versions/node/v12.0.0/lib/node_modules'",
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/opt/nvm/versions/node/v12.0.0/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npm-cache/12.0.0/_logs/2020-02-29T22_30_19_022Z-debug.log
I do not know the reason for this, and am new to using firebase, any help would be appreciated!