sindresorhus/beeper

Must use import to load ES Module error #18

agirorn posted onGitHub

I have tried to use this both with node and ts-node and always get "Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/user/code/testing-beeper/node_modules/beeper/index.js"

This is my tests file

import beeper from 'beeper';

beeper().then(
  () => { console.log('DONE'); },
  (error) => {
    console.log(error);
    process.exit(1);
  }
);

I'm probably doing something wrong, but I can not figure it out.


Fund this Issue

$0.00
Funded

Pull requests