alexemanuelol / rustplusplus

A NodeJS Discord Bot that uses the rustplus.js library to utilize the power of the Rust+ Companion App with additional Quality-of-Life features.
GNU General Public License v3.0
196 stars 97 forks source link

Error [ERR_REQUIRE_ESM] #341

Closed Ve0ny closed 1 month ago

Ve0ny commented 1 month ago

G:\temp\1>npm start run

rustplusplus@1.16.0 start ts-node . run

G:\temp\1\node_modules\ts-node\dist\index.js:851 return old(m, filename); ^ Error [ERR_REQUIRE_ESM]: require() of ES Module G:\temp\1\node_modules\translate\index.min.js from G:\temp\1\src\structures\RustPlus.js not supported. Instead change the require of index.min.js in G:\temp\1\src\structures\RustPlus.js to a dynamic import() which is available in all CommonJS modules. at require.extensions. [as .js] (G:\temp\1\node_modules\ts-node\dist\index.js:851:20) at Object. (G:\temp\1\src\structures\RustPlus.js:24:19) at m._compile (G:\temp\1\node_modules\ts-node\dist\index.js:857:29) { code: 'ERR_REQUIRE_ESM' }

G:\temp\1>

Ve0ny commented 1 month ago

This error began to occur after installing “punycode”, I assumed that because of this the rust did not see the bot (Rust++) that I launched, because something was written about it in the console.