小编dse*_*ing的帖子

TypeError:无法读取未定义的“需要”属性:

我整天都在成功地使用Firebase部署功能,学习如何使用它。我试图查看如果初始化了另一个部署到同一项目的目录并且在更新npm版本之前没有任何问题的情况,直到我更新npm版本时发生了什么,现在我每次尝试部署时都收到“发生意外错误”

我尝试通过使自己的用户成为node_modules,bin和共享目录的所有者来更新npm权限。我尝试卸载并重新安装firebase-tools。我还尝试删除所有当前函数目录并初始化一个新目录,然后在其中重新安装我的依赖项。

这是调试日志

Dylans-MacBook-Pro-3:functions dsenderling$ firebase deploy --debug
[2019-07-03T18:04:35.526Z] ----------------------------------------------------------------------
[2019-07-03T18:04:35.528Z] Command:       /usr/local/bin/node /usr/local/bin/firebase deploy --debug
[2019-07-03T18:04:35.529Z] CLI Version:   7.0.2
[2019-07-03T18:04:35.529Z] Platform:      darwin
[2019-07-03T18:04:35.529Z] Node Version:  v10.16.0
[2019-07-03T18:04:35.529Z] Time:          Wed Jul 03 2019 13:04:35 GMT-0500 (Central Daylight Time)
[2019-07-03T18:04:35.529Z] ----------------------------------------------------------------------

[2019-07-03T18:04:35.537Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[2019-07-03T18:04:35.537Z] > authorizing via signed-in user
[2019-07-03T18:04:35.537Z] [iam] checking project my-awesome-project-5a4e9 for permissions ["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","firebase.projects.get"]
[2019-07-03T18:04:35.539Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/my-awesome-project-5a4e9:testIamPermissions  
 permissions=[cloudfunctions.functions.create, cloudfunctions.functions.delete, cloudfunctions.functions.get, cloudfunctions.functions.list, cloudfunctions.functions.update, cloudfunctions.operations.get, firebase.projects.get]
[2019-07-03T18:04:35.769Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, …
Run Code Online (Sandbox Code Playgroud)

node.js firebase google-cloud-functions firebase-cli

22
推荐指数
2
解决办法
1605
查看次数