RedMadRobot / figma-export

Command line utility to export colors, typography, icons and images from Figma to Xcode / Android Studio project
MIT License
718 stars 114 forks source link

ERR_REQUIRE_ESM error #234

Closed berkaytheunicorn closed 4 months ago

berkaytheunicorn commented 4 months ago

Hi there, I'm started to get these error when I run figma-export use-confg command.


const stripAnsi = require('strip-ansi');
                  ^
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/XXXXX/node_modules/strip-ansi/index.js from /Users/XXXXX/node_modules/ora/index.js not supported.
Instead change the require of /Users/XXXXX/node_modules/strip-ansi/index.js in /Users/XXXXX/node_modules/ora/index.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/Users/XXXXX/node_modules/ora/index.js:7:19) {
  code: 'ERR_REQUIRE_ESM'
}```

> Node.js Version: v20.11.0