threadsjs/threads.js

Error [ERR_REQUIRE_ESM]: require() of ES Module

BF8W opened this issue · 4 comments

BF8W commented
Error [ERR_REQUIRE_ESM]: require() of ES Module

I think the example usage is just wrong, import { getToken } from "@threadsjs/threads.js/threads.js" works for me (although it looks kind of weird).

BF8W commented

i use js const { getToken, getUser } = require('@threadsjs/threads.js')

use imports, not consts. probably need to rewrite it.

fixed in 1.1.3