Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create new task/tracker with the interactive dialog. #260

Open
kai-hier opened this issue Jul 19, 2024 · 4 comments
Open

Unable to create new task/tracker with the interactive dialog. #260

kai-hier opened this issue Jul 19, 2024 · 4 comments
Labels

Comments

@kai-hier
Copy link

Context

debian 12/bookworm mite
mite 1.11.0
Node.js v18.19.0

Description

Unable to create new task/tracker with the interactive dialog.

Expected Behavior

When no arguments or just the "note" is given mite new asks for more details of the time-entry that should be created. Project, service and duration can be entered in an interactive survey.

Current Behavior

mite new
/usr/local/lib/node_modules/mite-cli/source/mite-new.js:5
const inquirer = require('inquirer');
                 ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /usr/local/lib/node_modules/mite-cli/node_modules/inquirer/lib/inquirer.js from /usr/local/lib/node_modules/mite-cli/source/mite-new.js not supported.
Instead change the require of inquirer.js in /usr/local/lib/node_modules/mite-cli/source/mite-new.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/usr/local/lib/node_modules/mite-cli/source/mite-new.js:5:18) {
  code: 'ERR_REQUIRE_ESM'
}
@Ephigenia
Copy link
Owner

Got it. Thanks for catching this. I think this can be resolved by reverting inquirer to an earlier version or migrating everything to be ESM compatible which might require more effort.

@Ephigenia Ephigenia added the bug label Jul 29, 2024
@kai-hier
Copy link
Author

Thanks for your fast reply. May you be able to show me how to downgrade inquirer?

@Ephigenia
Copy link
Owner

something like npm install inquirer@<previous-version>

@kai-hier
Copy link
Author

kai-hier commented Oct 2, 2024

Hello, is there anything new to this Problem?

I tried every version down to [email protected], but was unable to resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants