Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

393
Views
ReferenceError: document is not defined when using document.getElementById()

code:

    const admin = require('firebase-admin');

const serviceAccount = require("C:/Users/santo/Downloads/bestmpos-firebase-adminsdk.json");

admin.initializeApp({
 credential: admin.credential.cert(serviceAccount)
});

let fs = admin.firestore();
let auth = admin.auth();

start();
async function start (uid, userRecord){
  const info = await fs.collection('users').doc(uid).get();
 console.table(info.data());
 document.getElementById("greeting").innerHTML = "Bonjour";
}

Html code:

<script type="text/javascript" src="app3.js"></script>
    <body>
            <p id="greeting">Hello</p>
        </body>

when I wanted to pass bonjour value by using getElementById() there is a error saying that document.getElementById("greeting").innerHTML = "Bonjour"; ReferenceError: document is not defined

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!