'firebase' npm 包在函数后端中用于 .initializeApp(config) 和 .Auth().signInWithEmailAndPassword(email, password)
Firebase 部署/服务抛出此错误:
+ functions: Using node@16 from host.
i functions: Watching "C:\Users\ewert\Documents\Study\Udemy\Authentication\Firebase Practice\functions" for Cloud Functions...
!! functions: Failed to load function definition from source: FirebaseError: Failed to load function definition from source: Failed to generate manifest from function source: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in C:\Users\ewert\Documents\Study\Udemy\Authentication\Firebase Practice\functions\node_modules\firebase\package.json
Run Code Online (Sandbox Code Playgroud)
重新安装 firebase 软件包、更新 Node、npm 并使用“firebase-admin”并没有解决问题。
教程链接,步骤第 2.1 节
Firebase 版本:11.7.0
如果您能提供帮助,我将非常感激。