plewin / tp-link-modem-router

Goodies for TP-Link modem routers
GNU General Public License v3.0
82 stars 17 forks source link

[ERR_REQUIRE_ESM]: Must use import to load ES Module #3

Closed PowerOfSun44 closed 3 years ago

PowerOfSun44 commented 3 years ago

Hello,

First, Thanks for your work. I have a trouble when i try to send a SMS by my MR600.

internal/modules/cjs/loader.js:1149
      throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
      ^

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /var/www/html/plugins/script/data/tp-link-modem-router/sms-send.js
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1149:13)
    at Module.load (internal/modules/cjs/loader.js:977:32)
    at Function.Module._load (internal/modules/cjs/loader.js:877:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
    at internal/main/run_main_module.js:18:47 {
  code: 'ERR_REQUIRE_ESM'

I don't have any loggin just a password. See the attachment below. screenshot MR600

Can you help me ?

PowerOfSun44 commented 3 years ago

My issue is fixed. I had to update nodejs to 12.20.x.

Have a nice day.