Why we can no longer use require('conf') ?
erakis opened this issue · 2 comments
erakis commented
const Conf = require('conf');
^
Error [ERR_REQUIRE_ESM]: require() of ES Module <hidden>\node_modules\conf\dist\source\index.js from <hidden>\src\main.js not supported.
Instead change the require of index.js in <hidden>\src\main.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (<hidden>\src\main.js:4:14) {
code: 'ERR_REQUIRE_ESM'
}
Node.js v18.14.2
I used version 10.1.2
and since I upgraded to 11.0.2
this no longer works.
erakis commented
@sindresorhus Thank you so much, interesting. I think I missed the boat on that one! 🤣