Marked as helpful by the asker
Your package.json has "type": "module", so every .js file is ESM and require does not exist there. Pick one world and stay in it. For a modern project: ESM.
// before
const fs = require('fs');
// after
import fs from 'node:fs';Tell Bolt: "this project is ESM, use import/export only". It remembers within a session.