{"id":367,"date":"2020-11-28T19:48:50","date_gmt":"2020-11-28T19:48:50","guid":{"rendered":"http:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/?p=367"},"modified":"2020-11-28T19:52:22","modified_gmt":"2020-11-28T19:52:22","slug":"firebase-bash-firebase-command-not-found-windows","status":"publish","type":"post","link":"https:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/firebase-bash-firebase-command-not-found-windows\/","title":{"rendered":"Firebase -bash: firebase: command not found &#8211; Windows"},"content":{"rendered":"<p>On Windows, when trying to install Firebase with npm for the first time, you may see the error &#8220;-bash: firebase: command not found&#8221; or something similar, when you run the following command:<\/p>\r\n\r\n<pre>\r\n<div class=\"code\">\r\n$ firebase login\r\n<\/div>\r\n<\/pre>\r\n\r\n<ol>\r\n<li>You need to make sure your npm prefix has been added to your environment variables. Run the following:<\/li>\r\n\r\n<pre>\r\n<div class=\"code\">\r\n$ npm get prefix\r\n<\/div>\r\n<\/pre>\r\n\r\n<p>Mine was &#8220;C:\\Users\\<my Name>\\AppData\\Roaming\\npm.<\/p> \r\n<li>Next, use Windows Search and search for &#8220;Environment Variables&#8221;. The System Properties dialog box will appear, with Advanced tab active. Select the Environment Variables button.<\/li>\r\n<li>Then, in the System Variables area, find the PATH variable, select it, and click Edit.<\/li>\r\n<li>The Edit Environment Variable window will show, click the New button, and then enter the path that was shown when running the command above.<\/li>\r\n<li>Finally, restart Git Bash and try running &#8220;$ firebase login&#8221; again.<\/li>\r\n<\/ol>\r\n\r\n<p>When I tried running it, I received the following error: Error: Cannot run login in non-interactive mode. See login:ci to generate a token for use in non-interactive environments.<\/p>\r\n\r\n<p>Confused by the error message, I ran the following:<\/p>\r\n\r\n<pre>\r\n<div class=\"code\">\r\n$ firebase login:ci\r\n<\/div>\r\n<\/pre>\r\n\r\n<p>I received the following two errors:<br>\r\nError: Cannot run login:ci in non-interactive mode.<br>\r\nError: An unexpected error has occurred.<\/p>\r\n\r\n<p>Further investigation led me to this command, which helped resolve the issue:<\/p>\r\n\r\n<pre>\r\n<div class=\"code\">\r\n$ firebase login --interactive\r\n<\/div>\r\n<\/pre>\r\n\r\n<p>You can than proceed with the prompt below and then authenticate into your Google account<\/p>\r\n\r\n<img loading=\"lazy\" src=\"\/wp-content\/uploads\/2020\/11\/firebase-command-not-found.png\" alt=\"Firebase -bash: firebase: command not found \u2013 Windows\" width=\"565\" height=\"157\" class=\"alignnone size-full wp-image-370\" srcset=\"https:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/wp-content\/uploads\/2020\/11\/firebase-command-not-found.png 565w, https:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/wp-content\/uploads\/2020\/11\/firebase-command-not-found-300x83.png 300w\" sizes=\"(max-width: 565px) 100vw, 565px\" \/>","protected":false},"excerpt":{"rendered":"On Windows, when trying to install Firebase with npm for the first time, you may see the error &#8220;-bash: firebase: command not found&#8221; or something similar, when you run the following command: $ firebase login You need to make sure your npm prefix has been added to your environment variables. Run the following: $ npm [&hellip;]","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[19],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.1.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Firebase -bash: firebase: command not found \u2013 Windows<\/title>\n<meta name=\"description\" content=\"A resolution for when trying to install Firebase using npm in Windows, but the error &quot;-bash: firebase: command not found&quot; appears.\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Firebase -bash: firebase: command not found \u2013 Windows\" \/>\n<meta property=\"og:description\" content=\"A resolution for when trying to install Firebase using npm in Windows, but the error &quot;-bash: firebase: command not found&quot; appears.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/firebase-bash-firebase-command-not-found-windows\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Development Reference\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-28T19:48:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-11-28T19:52:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dev.pixelprofessionals.com\/wp-content\/uploads\/2020\/11\/firebase-command-not-found.png\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"1 minute\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"http:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/#website\",\"url\":\"http:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/\",\"name\":\"Web Development Reference\",\"description\":\"Web Development Solutions Explained -- Easy\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"http:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/firebase-bash-firebase-command-not-found-windows\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"\/wp-content\/uploads\/2020\/11\/firebase-command-not-found.png\",\"contentUrl\":\"\/wp-content\/uploads\/2020\/11\/firebase-command-not-found.png\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/firebase-bash-firebase-command-not-found-windows\/#webpage\",\"url\":\"https:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/firebase-bash-firebase-command-not-found-windows\/\",\"name\":\"Firebase -bash: firebase: command not found \\u2013 Windows\",\"isPartOf\":{\"@id\":\"http:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/firebase-bash-firebase-command-not-found-windows\/#primaryimage\"},\"datePublished\":\"2020-11-28T19:48:50+00:00\",\"dateModified\":\"2020-11-28T19:52:22+00:00\",\"author\":{\"@id\":\"http:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/#\/schema\/person\/9624bee17e4fbdcaad7eb7569f5faa70\"},\"description\":\"A resolution for when trying to install Firebase using npm in Windows, but the error \\\"-bash: firebase: command not found\\\" appears.\",\"breadcrumb\":{\"@id\":\"https:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/firebase-bash-firebase-command-not-found-windows\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/firebase-bash-firebase-command-not-found-windows\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/firebase-bash-firebase-command-not-found-windows\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"http:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/\",\"url\":\"http:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/firebase-bash-firebase-command-not-found-windows\/\",\"url\":\"https:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/firebase-bash-firebase-command-not-found-windows\/\",\"name\":\"Firebase -bash: firebase: command not found &#8211; Windows\"}}]},{\"@type\":\"Person\",\"@id\":\"http:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/#\/schema\/person\/9624bee17e4fbdcaad7eb7569f5faa70\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"http:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c0c4e0ed219e3aaa419ce72b52646d59?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c0c4e0ed219e3aaa419ce72b52646d59?s=96&d=mm&r=g\",\"caption\":\"admin\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7o7aF-5V","_links":{"self":[{"href":"https:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/wp-json\/wp\/v2\/posts\/367"}],"collection":[{"href":"https:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/wp-json\/wp\/v2\/comments?post=367"}],"version-history":[{"count":3,"href":"https:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/wp-json\/wp\/v2\/posts\/367\/revisions"}],"predecessor-version":[{"id":371,"href":"https:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/wp-json\/wp\/v2\/posts\/367\/revisions\/371"}],"wp:attachment":[{"href":"https:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/wp-json\/wp\/v2\/media?parent=367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/wp-json\/wp\/v2\/categories?post=367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.pixelprofessionals.com\/webdevelopmentreference\/wp-json\/wp\/v2\/tags?post=367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}