nocmt / ewelink-api-next

CoolKit v2 API Official Library
MIT License
19 stars 4 forks source link

ES module #2

Closed antonioGabrielGomes closed 1 year ago

antonioGabrielGomes commented 1 year ago

Error [ERR_REQUIRE_ESM]: require() of ES Module /home//server/node_modules/ewelink-api-next/dist/utils/index.js from //myservice.ts not supported. Instead change the require of index.js in /**/myservice.ts to a dynamic import() which is available in all CommonJS modules.

ghost commented 1 year ago

Modify your code and use import to import dependencies

antonioGabrielGomes commented 1 year ago

I'm using it, but some things I still use require