faressoft / inquirer-checkbox-plus-prompt

Checkbox with autocomplete and other additions for Inquirer
MIT License
39 stars 25 forks source link

ESM Error #17

Closed andrewstec closed 1 year ago

andrewstec commented 1 year ago

I receive this error when trying to use the latest version of 'inquirer'.

var chalk = require('chalk');
            ^
Error [ERR_REQUIRE_ESM]: require() of ES Module

Is there support for the latest 'inquirer' version?

hershmire commented 1 year ago

I just ran into this. It appears that the chalk lib is missing from the dependencies list in package.json so it implicitly will require chalk from the root level if you have that installed. In my case, chalk@v5 was in the root which switched to ESM.