Получение ниже сообщения об ошибке после выдачи команды "firebase serve --only functions, hosting"
! AssertionError [ERR_ASSERTION]: missing path
at Module.require (module.js:594:3)
at require (internal/module.js:11:18)
at InitializeFirebaseAdminStubs (C:\Users\Sushanth\AppData\Roaming\npm\node_modules\firebase-tools\lib\emulator\functionsEmulatorRuntime.js:231:18)
at C:\Users\Sushanth\AppData\Roaming\npm\node_modules\firebase-tools\lib\emulator\functionsEmulatorRuntime.js:451:9
at Generator.next (<anonymous>)
at C:\Users\Sushanth\AppData\Roaming\npm\node_modules\firebase-tools\lib\emulator\functionsEmulatorRuntime.js:7:71
at new Promise (<anonymous>)
at __awaiter (C:\Users\Sushanth\AppData\Roaming\npm\node_modules\firebase-tools\lib\emulator\functionsEmulatorRuntime.js:3:12)
at main (C:\Users\Sushanth\AppData\Roaming\npm\node_modules\firebase-tools\lib\emulator\functionsEmulatorRuntime.js:421:12)
at Object.<anonymous> (C:\Users\Sushanth\AppData\Roaming\npm\node_modules\firebase-tools\lib\emulator\functionsEmulatorRuntime.js:511:5)
! Your function was killed because it raised an unhandled error.
^CTerminate batch job (Y/N)? Y
Ниже приведены команды, которые я выполнил
Служба Firebase - только функции, хостинг
Получил сообщение, которое мне нужно обновить с 6.4.0 -> 6.9.2 «Запустите npm i -g firebase-tools для обновления»
После обновления снова выполнил подачу и получил сообщение «Доступно обновление 6.9.2 → 6.10.0», и я снова запустил обновление.
Также обновлен firebase-admin "npm i -g firebase-admin @ latest"
Снова запустил "firebase serve --only functions, hosting", начал видеть ниже сообщение о firebase-functions-test. Запустил указанную команду в папке функций.
+ functions: Using node@8 from host.
+ functions: Emulator started at http://localhost:5001
i functions: Watching "D:\BigData\13. Firebase\FB-BTD\FB-BTD\functions" for Cloud Functions...
i hosting: Serving hosting files from: public
+ hosting: Local server: http://localhost:5000
! The Cloud Functions emulator requires the module "firebase-functions-test" to be installed as a development dependency. To fix this, run "npm install --save-dev firebase-functions-test" in your functions directory.
i functions: Your functions could not be parsed due to an issue with your node_modules (see above)
[hosting] Rewriting / to http://localhost:5001/btd-in2-20180718/us-central1/app for local Function app
i functions: Beginning execution of "app"
! The Cloud Functions emulator requires the module "firebase-functions-test" to be installed as a development dependency. To fix this, run "npm install --save-dev firebase-functions-test" in your functions directory.
- В следующий раз, когда я запускаю firebase serve, я получаю сообщение об ошибке выше.
Из-за этого я не могу локально протестировать код firebase веб-узла.