Assistance Required: Firestore Service Not Available During Deployment with Vite and GitHub Actions #324
Unanswered
shanulhabib
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
![firebase error](https://private-user-images.githubusercontent.com/92203602/332833567-d55ed1df-afb7-44b4-b0a1-dc6dca98a976.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NDg2NDMsIm5iZiI6MTczOTQ0ODM0MywicGF0aCI6Ii85MjIwMzYwMi8zMzI4MzM1NjctZDU1ZWQxZGYtYWZiNy00NGI0LWIwYTEtZGM2ZGNhOThhOTc2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDEyMDU0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEzZjAxZTg2ZTRmNWQ2NzQwMjRjMmFkNWFlZWU5NDYyYTIzMWQyMmU4ZWNlOWY3N2VkMDg2ZmQzMGRiMjc2NWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.IPVBaTUlpgcEgADKE5pA95xt9s1BtC8zeTXd5VyXjzY)
I am currently facing an issue while deploying my Vite-based React application to AWS using GitHub Actions. The deployment process completes successfully, but when I try to run the application, I encounter the following error in the browser console: "Uncaught Error: Service firestore is not available".
I am using this vite.config.ts
`import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import viteTsconfigPaths from 'vite-tsconfig-paths'
import commonjs from '@rollup/plugin-commonjs';
export default defineConfig({
// depending on your application, base can also be "/"
base: '',
resolve: {
alias: {
'aws-sdk': 'aws-sdk/dist/aws-sdk.min.js',
},
},
define: {
global: 'globalThis',
},
plugins: [react(), viteTsconfigPaths(), updateCommonjsPlugin()],
server: {
// this ensures that the browser opens upon server start
open: true,
// this sets a default port to 3000
port: 3000,
watch: {
followSymlinks: false,
},
},
build: {
minify: false,
sourcemap: false,
},
})
function updateCommonjsPlugin(): import('vite').PluginOption {
const commonJs22 = commonjs({
include: [/node_modules/],
extensions: ['.js', '.cjs'],
strictRequires: true,
})
return {
name: 'new-common-js',
apply: 'build',
config: (config) => {
return {
...config,
plugins: [...(config.plugins || []), commonJs22],
}
},
}
}`
Need help and thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions