conventional-changelog / conventional-changelog/commitlint

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

Open
#4,094 12 comments 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
TypeScript
Stars
18.7k
Forks
970
Avg merge
7h 33m
Merged PRs (30d)
49

Description

### Steps to Reproduce

```bash
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
- [X] 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.