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

276
Views
lowdb write() in codesandbox not saving data to file?

I don't know if its a mistake on my end or a problem with codesandbox. I tryed a very basic setup with lowdb where i can load data from a json-file (so the connection is established) but the db.write() statement simply don't work.

Has anyone an explanation/ solution for me? =(

https://codesandbox.io/s/stoic-cache-ne2n10?file=/src/index.js

import { LowSync, JSONFileSync } from "lowdb";

const db = new LowSync(new JSONFileSync("/src/file.json"));

const a = async () => {
  await db.read();
  db.data.test2 = "123";
  console.log(db.data);
  await db.write();
  await db.read();
  console.log(db.data);
};

a();
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!