conventional-changelog/commitlint

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

Open

#4094 aperta il 3 lug 2024

Vedi su GitHub
 (12 commenti) (0 reazioni) (0 assegnatari)TypeScript (896 fork)batch import
bughelp wanted

Metriche repository

Star
 (15.497 star)
Metriche merge PR
 (Merge medio 5g 19h) (65 PR mergiate in 30 g)

Descrizione

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/prompt@19.3.1

git --version

v2.42.0

node --version

v21.1.0

Guida contributor