Framework : write a file from within data loader

Hello there ! Thanks very much for Framework.
I have no success so far to write a log-file at each data loader call.

I tried
import {writeFile} from ‘node:fs/promises’
writeFile(‘test.txt’, content);

No error and no file.

I surely miss something. Is there a limitation ?

Thanks for your advice

Alain

Hi Alain,

this should work (it’s standard JavaScript executed with node, no difference). Note that it runs within the root directory, so this is where the file should be written. You can try it independently of Framework by running

node src/data/file.csv.js

Hello Fil,

Sorry ! I was expecting the file in src/data. Silly me, I did not look at the right place !!
It works perfectly fine.

Thank you for your prompt reply.

Alain