Troubling with installing firebase-tools - firebase

After installing node and the npm, I tried installing firebase-tools on my computer (because cloud functions). This is what I see:
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/firebase-tools
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/firebase-tools/node_modules
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/firebase-tools/node_modules/#google-cloud
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules/firebase-tools
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/firebase-tools'
npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules/firebase-tools'
npm ERR! stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules/firebase-tools\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules/firebase-tools' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/joeljohnson/.npm/_logs/2018-01-26T16_56_29_829Z-debug.log
I haven't found a solution to my problem yet, how can I resolve this?

I was able to fix this. The problem is with the package 'grpc'. I don't know the exact nature of error but through trial and error i moved to the the directory where firebase was installed and installed grpc manually.
Commands for that are.
sudo npm install -g firebase-tools #This will give errors but let it be
cd /usr/lib/node_modules/firebase-tools/
sudo npm install grpc#1.4.1
sudo npm install -g firebase-tools

Related

Compatibility error that occurs during Firebase Functions deployment

The following error has occurred.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: functions#undefined
npm ERR! Found: firebase-admin#undefined
npm ERR! node_modules/firebase-admin
npm ERR! firebase-admin#"^111.5.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer firebase-admin#"^10.0.0 || ^11.0.0" from firebase-functions#4.2.1
npm ERR! node_modules/firebase-functions
npm ERR! firebase-functions#"^4.2.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! C:\Users\user\AppData\Local\npm-cache\_logs\2023-02-19T05_41_15_922Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Local\npm-cache\_logs\2023-02-19T05_41_15_922Z-debug-0.log
After researching a solution, I was advised to use the following command, but the issue still remains unresolved.
npm install --force
npm install --legacy-peer-deps
Can anyone help me with a solution?
I just ran into this same issue installing dependencies for Firebase functions. What worked for me was going into the "package.json" file within the "functions" folder and changing
"firebase-admin": "^111.5.0"
to
"firebase-admin": "^11.0.0"
AFTER running firebase init functions, but before installing the dependencies with npm. Hope this helps!

Can not install sass

I tried installing node-sass and it worked but the code in main.scss is not automatically transferred in style.css, then i deleted all the files including package.scss and tried reinstalling node-sass but i get these errors.
PS D:\web course\iti\bootstrap\sass> npm install node-sass
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic.
See https://v8.dev/blog/math-random for details.
npm WARN sass#1.0.0 No description
npm WARN sass#1.0.0 No repository field.
npm ERR! code EPERM
npm ERR! syscall unlink
npm ERR! path D:\web course\iti\bootstrap\sass\node_modules\.node-sass.DELETE\vendor\win32-x64-83\binding.node
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, unlink 'D:\web course\iti\bootstrap\sass\node_modules\.node-sass.DELETE\vendor\win32-x64-83\binding.node'
npm ERR! [OperationalError: EPERM: operation not permitted, unlink 'D:\web course\iti\bootstrap\sass\node_modules\.node-sass.DELETE\vendor\win32-x64-83\binding.node'] {
npm ERR! cause: [Error: EPERM: operation not permitted, unlink 'D:\web course\iti\bootstrap\sass\node_modules\.node-sass.DELETE\vendor\win32-x64-83\binding.node'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'D:\\web course\\iti\\bootstrap\\sass\\node_modules\\.node-sass.DELETE\\vendor\\win32-x64-83\\binding.node'
npm ERR! },
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'D:\\web course\\iti\\bootstrap\\sass\\node_modules\\.node-sass.DELETE\\vendor\\win32-x64-83\\binding.node',
npm ERR! parent: 'sass'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
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! C:\Users\TECH VALLEY\AppData\Roaming\npm-cache\_logs\2021-08-11T14_25_50_073Z-debug.log
PS D:\web course\iti\bootstrap\sass>
try
npm uninstall node-sass
then install again

EACCES: permission denied when installing an NPM package globally

I need to install firebase tools for firebase hosting. So I review the documentation and I run the command sudo npm install -g firebase-tools but this appears in my terminal.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated xmldom#0.1.31: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated har-validator#5.1.5: this library is no longer supported /usr/local/bin/firebase -> /usr/local/lib/node_modules/firebase-tools/lib/bin/firebase.js
npm ERR! code EACCES
npm ERR! syscall /usr/local/lib
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, acces '/usr/local/lib'
npm ERR! {[Error: EACCES: permission denied, acces '/usr/local/lib']
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, acces \'/usr/local/lib\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib' }
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 as root/Administrator.
This issue is related to permissions and can be resolved by installing a node version manager.
If you see an EACCES error when you try to install a package globally, you can either:
Reinstall npm with a node version manager (recommended),
or
Manually change npm's default directory
This is the best way to avoid permissions issues. To reinstall npm with a node version manager, follow the steps in "Downloading and installing Node.js and npm". You do not need to remove your current version of npm or Node.js before installing a node version manager.

Can't npm install firebase

I'm trying to do npm install for firebase but I keep running into errors...
I tried with npm version 5.6.0 and 5.7.1
I even tried installing assert-plus but that also failed (similar error to below). Any suggestions?
vagrant [polaris]> npm install firebase
npm ERR! path /vagrant/polaris/node_modules/grpc/node_modules/dashdash/node_modules/assert-plus/package.json.2882240414
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/vagrant/polaris/node_modules/grpc/node_modules/dashdash/node_modules/assert-plus/package.json.2882240414'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2018-03-14T23_28_13_938Z-debug.log
You should use npm install -g firebase-tools instead of npm install -g firebase. After that, you'll be able to initialize your project on your PC.
One quick suggestion. Delete your node_modules folder and do a fresh 'npm install'.

Cannot install atom package pandoc-convert in Manjaro

When I try to install the package pandoc-convert 1.1.0 on Atom 1.14.3 using the Manjaro LXqt OS 16.11 I get the following error:
Installing “pandoc-convert#1.1.0” failed.Hide output…
(node:9072) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
pandoc-bin#0.1.2 postinstall /tmp/apm-install-dir-117127-9072-634y30.v7yhbk2o6r/node_modules/pandoc-convert/node_modules/pandoc-bin
node index.js
⧗ Downloading Pandoc (~20-50MB depending on OS). This may take a minute or so.
/tmp/apm-install-dir-117127-9072-634y30.v7yhbk2o6r
└── (empty)
npm WARN deprecated win-spawn#2.0.0: use cross-spawn or cross-spawn-async instead.
npm WARN deprecated find-file#0.1.4: Use the globby package instead
path.js:7
throw new TypeError('Path must be a string. Received ' + inspect(path));
^
TypeError: Path must be a string. Received { url: 'https://raw.github.com/toshgoodson/pandoc-bin/0.1.0/vendor/linux/x64/pandoc',
name: 'pandoc',
os: 'linux',
arch: 'x64' }
at assertPath (path.js:7:11)
at Object.basename (path.js:1355:5)
at /tmp/apm-install-dir-117127-9072-634y30.v7yhbk2o6r/node_modules/pandoc-convert/node_modules/download/index.js:35:43
at each (/tmp/apm-install-dir-117127-9072-634y30.v7yhbk2o6r/node_modules/pandoc-convert/node_modules/each-async/each-async.js:63:4)
at module.exports (/tmp/apm-install-dir-117127-9072-634y30.v7yhbk2o6r/node_modules/pandoc-convert/node_modules/download/index.js:33:5)
at /tmp/apm-install-dir-117127-9072-634y30.v7yhbk2o6r/node_modules/pandoc-convert/node_modules/bin-wrapper/index.js:108:20
at /tmp/apm-install-dir-117127-9072-634y30.v7yhbk2o6r/node_modules/pandoc-convert/node_modules/bin-wrapper/index.js:141:24
at /tmp/apm-install-dir-117127-9072-634y30.v7yhbk2o6r/node_modules/pandoc-convert/node_modules/bin-check/index.js:30:20
at /tmp/apm-install-dir-117127-9072-634y30.v7yhbk2o6r/node_modules/pandoc-convert/node_modules/executable/index.js:39:20
at FSReqWrap.oncomplete (fs.js:114:15)
npm WARN enoent ENOENT: no such file or directory, open '/tmp/apm-install-dir-117127-9072-634y30.v7yhbk2o6r/package.json'
npm WARN apm-install-dir-117127-9072-634y30.v7yhbk2o6r No description
npm WARN apm-install-dir-117127-9072-634y30.v7yhbk2o6r No repository field.
npm WARN apm-install-dir-117127-9072-634y30.v7yhbk2o6r No README data
npm WARN apm-install-dir-117127-9072-634y30.v7yhbk2o6r No license field.
npm ERR! Linux 4.8.5-2-MANJARO
npm ERR! argv "/usr/bin/node" "/usr/lib/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/martinezce/.atom/.apm/.apmrc" "--userconfig" "/home/martinezce/.atom/.apmrc" "install" "/tmp/d-117127-9072-m6rmws.6kl2mg3nmi/package.tgz" "--runtime=electron" "--target=1.4.15" "--arch=x64" "--global-style"
npm ERR! node v7.6.0
npm ERR! npm v4.3.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pandoc-bin#0.1.2 postinstall: node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pandoc-bin#0.1.2 postinstall script 'node index.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pandoc-bin package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pandoc-bin
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls pandoc-bin
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/martinezce/.atom/.apm/_logs/2017-02-27T13_55_01_959Z-debug.log
I can install it on a Windows machine fine, but on Manjaro it doesn't work.
Maybe, it's a package issue?
Thank you for your help.
Best Regards,
Cédric Martinez

Resources