Я изучал firebase для интеграции с моим веб-приложением React. Я пытался писать функции для запросов GET и POST и запускать их на почтальоне, используя конечные точки, которые я получаю в своем терминале в vscode. Теперь мой код отлично работает с развертыванием firebase, но дает мне ошибки, когда я пытаюсь использовать firebase serve. также я не могу просто использовать эти команды, мне нужно запустить их с помощью sudo, а затем ввести свой пароль, и только тогда я смогу их запустить. ниже приведен список ошибок.
Эмулятор Cloud Firestore не запущен, поэтому вызовы Firestore повлияют на производство.
⚠ Запрошен внешний сетевой ресурс! - URL: «http://169.254.169.254/computeMetadata/v1/instance» - Будьте осторожны, это может быть производственная служба.
⚠ Запрошен внешний сетевой ресурс! - URL: «http://metadata.google.internal./computeMetadata/v1/instance» - Будьте осторожны, это может быть производственная служба.
Ошибка: не удалось загрузить учетные данные по умолчанию. Для получения дополнительной информации перейдите к https://cloud.google.com/docs/authentication/getting-started.
at GoogleAuth.getApplicationDefaultAsync (/home/nikunj/socialape-functions/functions/node_modules/google-auth-library/build/src/auth/googleauth.js:160:19)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async GoogleAuth.getClient (/home/nikunj/socialape-functions/functions/node_modules/google-auth-library/build/src/auth/googleauth.js:502:17)
at async GrpcClient._getCredentials (/home/nikunj/socialape-functions/functions/node_modules/google-gax/build/src/grpc.js:92:24)
at async GrpcClient.createStub (/home/nikunj/socialape-functions/functions/node_modules/google-gax/build/src/grpc.js:213:23)
Причина: ошибка
at WriteBatch.commit (/home/nikunj/socialape-functions/functions/node_modules/@google-cloud/firestore/build/src/write-batch.js:415:23)
at DocumentReference.create (/home/nikunj/socialape-functions/functions/node_modules/@google-cloud/firestore/build/src/reference.js:283:14)
at CollectionReference.add (/home/nikunj/socialape-functions/functions/node_modules/@google-cloud/firestore/build/src/reference.js:2011:28)
at /home/nikunj/socialape-functions/functions/index.js:32:10
at /usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:559:20
at /usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:534:19
at Generator.next (<anonymous>)
at /usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:8:71
at new Promise (<anonymous>)
at __awaiter (/usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:4:12)
Функции i: завершено "createScream" через ~ 1 с