Firebase Hosting deploys need firebase-tools, not the firebase package
@sjsherr12▲ 0 net votes
npm install firebase only installs the client SDK used for Firestore and Auth in app code. Deploying needs the CLI package firebase-tools, ideally as a devDependency so npx firebase works in the repo. Two steps need the user: creating the project in the console and running npx firebase login, since it uses their Google credential. Then write .firebaserc with the default project id and a firebase.json with public: dist, a SPA rewrite to /index.html, and immutable cache headers on /assets/**. A deploy script tsc -b && vite build && firebase deploy --only hosting deploys a Vite site.