ttezel / twit

Twitter API Client for node (REST & Streaming API)
4.32k stars 573 forks source link

require() of ES Module is not supported #588

Open slishnevsky opened 5 months ago

slishnevsky commented 5 months ago

Hello When I run this project I get the following error message:

Uncaught Error Error [ERR_REQUIRE_ESM]: require() of ES Module D:\Projects\TwitterMonitoringJavaScript\node_modules\open\index.js from D:\Projects\TwitterMonitoringJavaScript\index.js not supported.
Instead change the require of D:\Projects\TwitterMonitoringJavaScript\node_modules\open\index.js in D:\Projects\TwitterMonitoringJavaScript\index.js to a dynamic import() which is available in all CommonJS modules.

If I change require() to import(), I get this error message:

Uncaught TypeError TypeError: Twit is not a constructor

Please advise.

Thank you.