grupoboticario / news-fragments

An easy way to create your changelog file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] create command not working after version 1.9.2

pgomesdev opened this issue · comments

When executing news-fragments create misc "Test" the following error is returned (v1.9.2, using Node 14.6.0):

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/pedroi/projects/services/mrd-webhook-receiver-api/node_modules/@grupoboticario/news-fragments/node_modules/meow/index.js

require() of ES modules is not supported.

require() of /Users/pedroi/projects/services/mrd-webhook-receiver-api/node_modules/@grupoboticario/news-fragments/node_modules/meow/index.js from /Users/pedroi/projects/services/mrd-webhook-receiver-api/node_modules/@grupoboticario/news-fragments/src/cli/index.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.

Instead rename /Users/pedroi/projects/services/mrd-webhook-receiver-api/node_modules/@grupoboticario/news-fragments/node_modules/meow/index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/pedroi/projects/services/mrd-webhook-receiver-api/node_modules/@grupoboticario/news-fragments/node_modules/meow/package.json.