Произошла следующая ошибка.
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
После поиска решения мне посоветовали использовать следующую команду, но проблема все еще остается нерешенной.
npm install --force
npm install --legacy-peer-deps
Может ли кто-нибудь помочь мне с решением?
Я только что столкнулся с этой же проблемой при установке зависимостей для функций Firebase. Что сработало для меня, так это войти в файл "package.json" в папке "функции" и изменить
"firebase-admin": "^111.5.0"
К
"firebase-admin": "^11.0.0"
ПОСЛЕ запуска функций инициализации firebase, но перед установкой зависимостей с помощью npm. Надеюсь это поможет!