繁体   English   中英

如何修复 firebase“找不到命令”错误

[英]how to fix firebase "command not found" error

嗨,我在尝试添加firebase package 时遇到此问题,出现以下错误...

found 385 vulnerabilities (366 low, 7 moderate, 12 high)
  run `npm audit fix`` to fix them, or `nom audit` for details
PS D: \Downloads\ codecanyon-G8bOFJ14-superstore-grocery-store-super-shop-management-pos\main-files\superstore-1.1> firebase init functions
firebase: The term 'firebase' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ firebase init functions
+ ~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (firebase:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

附加截图

看起来您还没有安装 Firebase CLI。

如果您在本地安装了 NPM,则可以使用以下命令安装 Firebase CLI:

npm install firebase-tools -g

或者,您可以使用安装说明中链接的 Windows 的预构建二进制文件 如果您对 NPM 不太满意,我建议您将其作为一种更简单的入门方式。

  1. npm 配置获取前缀
  2. 在我的例子中,它返回一个路径 C:\Program Files\Git\usr\local。 在您的情况下,它可能会返回不同的路径。 然后 go 到路径中找到 node_modules -> npm 然后复制路径。
  3. Go 到路径 C:\Program Files\Git\usr\local\node_modules\npm
  4. 点击编辑系统环境变量
  5. 点击环境变量
  6. 从底部系统变量中找到路径
  7. 单击路径变量中的编辑
  8. 在我的情况下,单击新建并粘贴路径点 3
  9. 最后点击确定并关闭命令行
  10. 重新打开命令行并输入 firebase --version。 然后它将返回您安装的版本。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM