相关疑难解决方法(0)

无法部署/服务 Firebase,并出现错误:package.json 中没有定义“exports”main

'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

如果您能提供帮助,我将非常感激。

node.js firebase

18
推荐指数
1
解决办法
2万
查看次数

标签 统计

firebase ×1

node.js ×1