I used to be able to run and deploy my code using firebase. I then upgraded to the new m1 MacBook pro. I git cloned my code and made some minor changes. I tried using
firebase deploy
but I got the error message
zsh: command not found: firebase
then I tried
npm install -g firebase-tools
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm ERR! code EACCES
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/firebase-tools/lib/bin/firebase.js
npm ERR! dest /usr/local/bin/firebase
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/firebase-tools/lib/bin/firebase.js' -> '/usr/local/bin/firebase'
npm ERR! [OperationalError: EACCES: permission denied, symlink '../lib/node_modules/firebase-tools/lib/bin/firebase.js' -> '/usr/local/bin/firebase'] {
npm ERR! cause: [Error: EACCES: permission denied, symlink '../lib/node_modules/firebase-tools/lib/bin/firebase.js' -> '/usr/local/bin/firebase'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/firebase-tools/lib/bin/firebase.js',
npm ERR! dest: '/usr/local/bin/firebase'
npm ERR! },
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/firebase-tools/lib/bin/firebase.js',
npm ERR! dest: '/usr/local/bin/firebase'
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.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/brennanadams/.npm/_logs/2020-12-03T18_52_42_463Z-debug.log
I looked this up on the internet but I have yet to find a solution, any help is appreciated. I am not sure if this is because I have the m1 chip and it not compatible or if a bunch of my settings reset when I upgraded. Thank you for help.
EDIT: Original title for this question asked about the
request
deprecation which is why I spend a paragraph explaining that's not the real problem before getting to what the real issue is and what needs to be done.Regarding
request
: You don't need to do anything about that.request
will continue working just fine as a dependency offirebase
. Hopefully, they will replace it with something else at some point, but there's no issue to address. The deprecation of therequest
module was done as a proactive measure to push people to more actively-maintained and modern solutions. It wasn't because there's something fundamentally broken withrequest
that requires people to move to something else now now now or anything like that.Instead, your problem here is the
EACCESS
issue. For that, you'll want to review thenpm
documentation on that problem. The upshot is you probably want to reinstall Node.js with a version manager such asnvm
. If you can't or don't want to do that, you can configurenpm
to install global packages in a directory that you have write permission to.