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

fix: Cannot find module '/Users/steven/Desktop/Github/constore-ui/node_modules/inquirer/lib/prompts/input.js' #4094

Open
1 of 4 tasks
steven-fe opened this issue Jul 3, 2024 · 12 comments

Comments

@steven-fe
Copy link

Steps to Reproduce

1. npm install --save-dev @commitlint/{cli,config-conventional,prompt-cli}
2. npx commit

Current Behavior

node:internal/modules/esm/resolve:255
throw new ERR_MODULE_NOT_FOUND(
^

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/steven/Desktop/Github/constore-ui/node_modules/inquirer/lib/prompts/input.js' imported from /Users/steven/Desktop/Github/constore-ui/node_modules/@commitlint/prompt/lib/inquirer/InputCustomPrompt.js

Expected Behavior

The "inquirer" module can be imported normally.

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

The "inquirer" module should be used as is, for example:

bad: import InputPrompt from 'inquirer/lib/prompts/input.js';

Because the structure of the "inquirer" module may change!

Context

No response

commitlint --version

@commitlint/[email protected]

git --version

v2.42.0

node --version

v21.1.0

@knocte

This comment was marked as outdated.

@devmozao

This comment was marked as outdated.

@knocte

This comment was marked as outdated.

@devmozao

This comment was marked as outdated.

@knocte

This comment was marked as outdated.

@devmozao

This comment was marked as outdated.

@knocte

This comment was marked as outdated.

@escapedcat

This comment was marked as outdated.

@devmozao

This comment was marked as outdated.

@devmozao
Copy link

devmozao commented Jul 8, 2024

They made a rollback on @InQuirer to keep this feature, since it has some other libs still using it, but the recommendation of theirs continue: to upgrade to @inquirer/core, because they're rewriting the lib itself, since its +10 years old.

Today I tested here and everything went back to normal. Will definitely keep an eye at @commitizen and see if I can improve, but I think this solves for now and this issue can be closed.

Thank you all for the attention given. o/

@knocte
Copy link
Contributor

knocte commented Jul 9, 2024

Sounds like they kicked the can down the road, hehe. Which means, it's just a workaround, not the ultimate fix. So I think this github issue should be left open until we can adopt @inquirer/core.

@escapedcat
Copy link
Member

@devmozao thanks for the update!
@knocte agreed, let's keep this open.

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

No branches or pull requests

4 participants