the code in the HTML file is:
<script src="https://www.gstatic.com/firebasejs/9.1.2/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.1.2/firebase-database.js"></script>
<script src="firebase.js"></script>
And the firebase.js has this code:
// Import the functions you need from the SDKs you need
// import { initializeApp } from "https://www.gstatic.com/firebasejs/9.1.2/firebase-app.js";
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries
function initializeApp() {
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: "XXXXXXXXXXXXXXXXXXXXX",
authDomain: "coupon-finder-73300.firebaseapp.com",
projectId: "coupon-finder-73300",
storageBucket: "coupon-finder-73300.appspot.com",
messagingSenderId: "432596469035",
appId: "1:432596469035:web:54b907640f9065fc33b16e"
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
console.log(app);
}
The folder is load unpacked in the chrome extension, and there it generates no error, but as shared in the image above when I browse that file in the browser it generates an error:
Uncaught SyntaxError: Unexpected token 'export'
firebase-database.js:1 Uncaught SyntaxError: Cannot use import statement outside a module
what step should I do to troubleshoot?